matplotlib.patches.Ellipse — Matplotlib 3.10.1 documentation (original) (raw)
class matplotlib.patches.Ellipse(xy, width, height, *, angle=0, **kwargs)[source]#
Bases: Patch
A 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 angle#
Return the angle of the ellipse.
property center#
Return the center of the ellipse.
Return the angle of the ellipse.
Return the center of the ellipse.
Return the co-vertices coordinates of the ellipse.
The definition can be found here
Added in version 3.8.
Return the corners of the ellipse bounding box.
The bounding box orientation is moving anti-clockwise from the lower left corner defined before rotation.
Return the height of the ellipse.
get_patch_transform()[source]#
Return the Transform instance mapping patch coordinates to data coordinates.
For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5.
Return the path of the ellipse.
Return the vertices coordinates of the ellipse.
The definition can be found here
Added in version 3.8.
Return the width of the ellipse.
property height#
Return the height of the ellipse.
set(*, agg_filter=, alpha=, angle=, animated=, antialiased=, capstyle=, center=, clip_box=, clip_on=, clip_path=, color=, edgecolor=, facecolor=, fill=, gid=, hatch=, hatch_linewidth=, height=, in_layout=, joinstyle=, label=, linestyle=, linewidth=, mouseover=, path_effects=, picker=, rasterized=, sketch_params=, snap=, transform=, url=, visible=, width=, zorder=)[source]#
Set multiple properties at once.
Supported properties are
Set the angle of the ellipse.
Parameters:
anglefloat
Set the center of the ellipse.
Parameters:
xy(float, float)
Set the height of the ellipse.
Parameters:
heightfloat
Set the width of the ellipse.
Parameters:
widthfloat
property width#
Return the width of the ellipse.