matplotlib.patches.RegularPolygon — Matplotlib 3.10.3 documentation (original) (raw)
class matplotlib.patches.RegularPolygon(xy, numVertices, *, radius=5, orientation=0, **kwargs)[source]#
Bases: Patch
A regular polygon patch.
Parameters:
xy(float, float)
The center position.
numVerticesint
The number of vertices.
radiusfloat
The distance from the center to each of the vertices.
orientationfloat
The polygon rotation angle (in radians).
**kwargs
Patch properties:
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 this patch.
set(*, agg_filter=, alpha=, animated=, antialiased=, capstyle=, clip_box=, clip_on=, clip_path=, color=, edgecolor=, facecolor=, fill=, gid=, hatch=, hatch_linewidth=, in_layout=, joinstyle=, label=, linestyle=, linewidth=, mouseover=, path_effects=, picker=, rasterized=, sketch_params=, snap=, transform=, url=, visible=, zorder=)[source]#
Set multiple properties at once.
Supported properties are