<jupyter_start><jupyter_text>Title  Ellipse Element  Dependencies Matplotlib  Backends    Matplotlib    Bokeh    Plotly<jupyter_code>import numpy as np
import holoviews as hv
from holoviews import opts

hv.extension('matplotlib')<jupyter_output><empty_output><jupyter_text>An ``Ellipse`` is an annotation that takes a center x-position, a center y-position, a size:<jupyter_code>opts.defaults(opts.Ellipse(linewidth=6))

# Generate some data
c1 = np.random.normal(loc=2, scale=0.2, size=(200,200))
c2x = np.random.normal(loc=-2, scale=0.6, size=200)
c2y = np.random.normal(loc=-2, scale=0.1, size=200)
c3 = np.random.normal(loc=0, scale=1.5, size=(400,400))
# Create an overlay of points and ellipses
clusters = hv.Points(c1) * hv.Points((c2x, c2y)) * hv.Points(c3)
clusters * hv.Ellipse(2,2, 2) * hv.Ellipse(-2,-2, (4,2))<jupyter_output><empty_output><jupyter_text>By default, the size is just a diameter, resulting in a circle such as the blue circle above. Alternatively, the size can be given as the tuple ``(width, height)`` as shown for the red ellipse above. If you only supply a diameter, you can still specify an ellipse by specifying an optional aspect value.  In addition, you can also set the orientation (in radians, rotating anticlockwise):<jupyter_code>clusters = hv.Points(c1) * hv.Points((c2x, c2y)) * hv.Points(c3)
clusters *  hv.Ellipse(0,0, 4, orientation=np.pi/5, aspect=2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12570224719101122, 'fraction_numerical': 0.038623595505617975, 'mean_word_length': 5.753554502369668, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '95833', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 556, 'n_tokens_neox': 516, 'n_words': 145, 'path': 'examples/reference/elements/matplotlib/Ellipse.ipynb', 'repo_name': 'Guillemdb/holoviews', 'size': '1424'}