matplotlib.patches.FancyArrow#

class matplotlib.patches.FancyArrow(x, y, dx, dy, *, width=0.001, length_includes_head=False, head_width=None, head_length=None, shape='full', overhang=0, head_starts_at_zero=False, **kwargs)[Quelle]#

Bases: Polygon

Ähnlich wie Arrow, aber ermöglicht die unabhängige Einstellung von Kopfbreite und Kopfhöhe.

Parameter:
x, yfloat

Die x- und y-Koordinaten der Pfeilbasis.

dx, dyfloat

Die Länge des Pfeils in x- und y-Richtung.

widthfloat, Standard: 0.001

Breite des gesamten Pfeilschafts.

length_includes_headbool, Standard: False

True, wenn die Spitze bei der Längenberechnung berücksichtigt werden soll.

head_widthfloat oder None, Standard: 3*width

Gesamtbreite der vollen Pfeilspitze.

head_lengthfloat oder None, Standard: 1.5*head_width

Länge der Pfeilspitze.

shape{'full', 'left', 'right'}, Standard: 'full'

Zeichne die linke Hälfte, die rechte Hälfte oder den gesamten Pfeil.

overhangfloat, Standard: 0

Anteil, um den der Pfeil nach hinten gezogen wird (0 Überhang bedeutet dreieckige Form). Kann negativ oder größer als eins sein.

head_starts_at_zerobool, Standard: False

Wenn True, beginnt die Spitze bei Koordinate 0 zu zeichnen, anstatt bei Koordinate 0 zu enden.

**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

set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, closed=<UNSET>, color=<UNSET>, data=<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>, xy=<UNSET>, zorder=<UNSET>)[Quelle]#

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

geschlossen

bool

color

color

Daten

unknown

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

xy

(N, 2) array-ähnlich

zorder

float

set_data(*, x=None, y=None, dx=None, dy=None, width=None, head_width=None, head_length=None)[Quelle]#

Setzt die x, y, dx, dy, width, head_with und head_length von FancyArrow. Werte, die auf None belassen werden, werden nicht aktualisiert.

Parameter:
x, yfloat oder None, Standard: None

Die x- und y-Koordinaten der Pfeilbasis.

dx, dyfloat oder None, Standard: None

Die Länge des Pfeils in x- und y-Richtung.

widthfloat oder None, Standard: None

Breite des gesamten Pfeilschafts.

head_widthfloat oder None, Standard: None

Gesamtbreite der vollen Pfeilspitze.

head_lengthfloat oder None, Standard: None

Länge der Pfeilspitze.

Beispiele für die Verwendung von matplotlib.patches.FancyArrow#

Pfeilführer

Pfeilführer