matplotlib.patches.Annulus — Matplotlib 3.10.3 documentation (original) (raw)
class matplotlib.patches.Annulus(xy, r, width, angle=0.0, **kwargs)[source]#
Bases: Patch
An elliptical annulus.
Parameters:
xy(float, float)
xy coordinates of annulus centre.
rfloat or (float, float)
The radius, or semi-axes:
- If float: radius of the outer circle.
- If two floats: semi-major and -minor axes of outer ellipse.
widthfloat
Width (thickness) of the annular ring. The width is measured inward from the outer ellipse so that for the inner ellipse the semi-axes are given by r - width
. width must be less than or equal to the semi-minor axis.
anglefloat, default: 0
Rotation angle in degrees (anti-clockwise from the positive x-axis). Ignored for circular annuli (i.e., if r is a scalar).
**kwargs
Keyword arguments control the Patch properties:
property angle#
Return the angle of the annulus.
property center#
Return the center of the annulus.
Return the angle of the annulus.
Return the center of the annulus.
Return the path of this patch.
Return the semi-major and semi-minor radii of the annulus.
Return the width (thickness) of the annulus ring.
property radii#
Return the semi-major and semi-minor radii of the annulus.
set(*, agg_filter=, alpha=, angle=, animated=, antialiased=, capstyle=, center=, clip_box=, clip_on=, clip_path=, color=, edgecolor=, facecolor=, fill=, gid=, hatch=, hatch_linewidth=, in_layout=, joinstyle=, label=, linestyle=, linewidth=, mouseover=, path_effects=, picker=, radii=, rasterized=, semimajor=, semiminor=, sketch_params=, snap=, transform=, url=, visible=, width=, zorder=)[source]#
Set multiple properties at once.
Supported properties are
Set the tilt angle of the annulus.
Parameters:
anglefloat
Set the center of the annulus.
Parameters:
xy(float, float)
Set the semi-major (a) and semi-minor radii (b) of the annulus.
Parameters:
rfloat or (float, float)
The radius, or semi-axes:
- If float: radius of the outer circle.
- If two floats: semi-major and -minor axes of outer ellipse.
Set the semi-major axis a of the annulus.
Parameters:
afloat
Set the semi-minor axis b of the annulus.
Parameters:
bfloat
Set the width (thickness) of the annulus ring.
The width is measured inwards from the outer ellipse.
Parameters:
widthfloat
property width#
Return the width (thickness) of the annulus ring.