matplotlib.patches.RegularPolygon#

class matplotlib.patches.RegularPolygon(xy, numVertices, *, radius=5, orientation=0, **kwargs)[source]#

Bases: Patch

Ein reguläres Polygon-Patch.

Parameter:
xy(float, float)

Die Mittelposition.

numVerticesint

Die Anzahl der Eckpunkte.

radiusfloat

Der Abstand vom Mittelpunkt zu jedem der Eckpunkte.

orientationfloat

Der Rotationswinkel des Polygons (in Radiant).

**kwargs

Patch-Eigenschaften

Eigenschaft

Beschreibung

agg_filter

eine Filterfunktion, die ein (m, n, 3) Float-Array und einen dpi-Wert entgegennimmt und ein (m, n, 3) Array und zwei Offsets von der linken unteren Ecke des Bildes zurückgibt

alpha

unknown

animated

bool

antialiased oder aa

bool oder None

capstyle

CapStyle oder {'butt', 'projecting', 'round'}

clip_box

BboxBase oder None

clip_on

bool

clip_path

Patch oder (Path, Transform) oder None

color

color

edgecolor oder ec

Farbe oder None

facecolor oder fc

Farbe oder None

figure

Figure oder SubFigure

füllen

bool

gid

str

Muster (hatch)

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

unknown

in_layout

bool

joinstyle

JoinStyle oder {'miter', 'round', 'bevel'}

label

object

linestyle oder ls

{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

linewidth oder lw

float oder None

mouseover

bool

path_effects

Liste von AbstractPathEffect

picker

None oder bool oder float oder callable

rasterized

bool

sketch_params

(scale: float, length: float, randomness: float)

snap

bool oder None

transform

Transform

url

str

visible

bool

zorder

float

get_patch_transform()[source]#

Gibt die Transform-Instanz zurück, die Patch-Koordinaten in Datenkoordinaten abbildet.

Man kann beispielsweise einen Kreis-Patch definieren, der einen Radius von 5 darstellt, indem man Koordinaten für einen Einheitskreis und eine Transformation angibt, die die Koordinaten (die Patch-Koordinaten) mit 5 skaliert.

get_path()[source]#

Gibt den Pfad dieser Markierung zurück.

set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<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>, 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>, zorder=<UNSET>)[source]#

Setzt mehrere Eigenschaften auf einmal.

Unterstützte Eigenschaften sind

Eigenschaft

Beschreibung

agg_filter

eine Filterfunktion, die ein (m, n, 3) Float-Array und einen dpi-Wert entgegennimmt und ein (m, n, 3) Array und zwei Offsets von der linken unteren Ecke des Bildes zurückgibt

alpha

float oder None

animated

bool

antialiased oder aa

bool oder None

capstyle

CapStyle oder {'butt', 'projecting', 'round'}

clip_box

BboxBase oder None

clip_on

bool

clip_path

Patch oder (Path, Transform) oder None

color

color

edgecolor oder ec

Farbe oder None

facecolor oder fc

Farbe oder None

figure

Figure oder SubFigure

füllen

bool

gid

str

Muster (hatch)

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

unknown

in_layout

bool

joinstyle

JoinStyle oder {'miter', 'round', 'bevel'}

label

object

linestyle oder ls

{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

linewidth oder lw

float oder None

mouseover

bool

path_effects

Liste von AbstractPathEffect

picker

None oder bool oder float oder callable

rasterized

bool

sketch_params

(scale: float, length: float, randomness: float)

snap

bool oder None

transform

Transform

url

str

visible

bool

zorder

float

Beispiele mit matplotlib.patches.RegularPolygon#

Referenz für Matplotlib-Künstler

Referenz für Matplotlib-Künstler

Radardiagramm (auch Spinnen- oder Sternendiagramm genannt)

Radardiagramm (auch Spinnen- oder Sternendiagramm genannt)