matplotlib.patches.Ellipse#
- classmatplotlib.patches.Ellipse(xy,width,height,*,angle=0,**kwargs)[source]#
Bases:
PatchA scale-free ellipse.
- Parameters:
- xy(float, float)
xy coordinates of ellipse centre.
- widthfloat
Total length (diameter) of horizontal axis.
- heightfloat
Total length (diameter) of vertical axis.
- anglefloat, default: 0
Rotation in degrees anti-clockwise.
Notes
Valid keyword arguments are:
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
unknown
bool
bool or None
CapStyleor {'butt', 'projecting', 'round'}BboxBaseor Nonebool
Patch or (Path, Transform) or None
color or None
color or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
unknown
bool
JoinStyleor {'miter', 'round', 'bevel'}object
{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
float or None
bool
list of
AbstractPathEffectNone or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
float
- propertyangle#
Return the angle of the ellipse.
- propertycenter#
Return the center of the ellipse.
- get_co_vertices()[source]#
Return the co-vertices coordinates of the ellipse.
The definition can be foundhere
Added in version 3.8.
- get_corners()[source]#
Return the corners of the ellipse bounding box.
The bounding box orientation is moving anti-clockwise from thelower left corner defined before rotation.
- get_patch_transform()[source]#
Return the
Transforminstance mapping patch coordinatesto data coordinates.For example, one may define a patch of a circle which represents aradius of 5 by providing coordinates for a unit circle, and atransform which scales the coordinates (the patch coordinate) by 5.
- get_vertices()[source]#
Return the vertices coordinates of the ellipse.
The definition can be foundhere
Added in version 3.8.
- propertyheight#
Return the height of the ellipse.
- set(*,agg_filter=<UNSET>,alpha=<UNSET>,angle=<UNSET>,animated=<UNSET>,antialiased=<UNSET>,capstyle=<UNSET>,center=<UNSET>,clip_box=<UNSET>,clip_on=<UNSET>,clip_path=<UNSET>,color=<UNSET>,edgecolor=<UNSET>,facecolor=<UNSET>,fill=<UNSET>,gid=<UNSET>,hatch=<UNSET>,hatch_linewidth=<UNSET>,height=<UNSET>,in_layout=<UNSET>,joinstyle=<UNSET>,label=<UNSET>,linestyle=<UNSET>,linewidth=<UNSET>,mouseover=<UNSET>,path_effects=<UNSET>,picker=<UNSET>,rasterized=<UNSET>,sketch_params=<UNSET>,snap=<UNSET>,transform=<UNSET>,url=<UNSET>,visible=<UNSET>,width=<UNSET>,zorder=<UNSET>)[source]#
Set multiple properties at once.
Supported properties are
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
float or None
float
bool
bool or None
CapStyleor {'butt', 'projecting', 'round'}(float, float)
BboxBaseor Nonebool
Patch or (Path, Transform) or None
color or None
color or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
unknown
float
bool
JoinStyleor {'miter', 'round', 'bevel'}object
{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
float or None
bool
list of
AbstractPathEffectNone or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
float
float
- propertywidth#
Return the width of the ellipse.
Examples usingmatplotlib.patches.Ellipse#
Plot a confidence ellipse of a two-dimensional dataset