class matplotlib.patches.FancyArrowPatch(posA=None, posB=None, path=None, arrowstyle='simple', arrow_transmuter=None, connectionstyle='arc3', connector=None, patchA=None, patchB=None, shrinkA=2, shrinkB=2, mutation_scale=1, mutation_aspect=None, dpi_cor=1, **kwargs)
[source]
Bases: matplotlib.patches.Patch
A fancy arrow patch. It draws an arrow using the ArrowStyle
.
The head and tail positions are fixed at the specified start and end points of the arrow, but the size and shape (in display coordinates) of the arrow does not change when the axis is moved or zoomed.
If posA and posB are given, a path connecting two points is created according to connectionstyle. The path will be clipped with patchA and patchB and further shrunken by shrinkA and shrinkB. An arrow is drawn along this resulting path using the arrowstyle parameter.
Alternatively if path is provided, an arrow is drawn along this path and patchA, patchB, shrinkA, and shrinkB are ignored.
Parameters: |
|
---|
Valid kwargs are:
Property | Description |
---|---|
agg_filter | a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array |
alpha | float or None |
animated | bool |
antialiased or aa | unknown |
capstyle | {'butt', 'round', 'projecting'} |
clip_box | Bbox |
clip_on | bool |
clip_path | [(Path , Transform ) | Patch | None] |
color | color |
contains | callable |
edgecolor or ec | color or None or 'auto' |
facecolor or fc | color or None |
figure | Figure |
fill | bool |
gid | str |
hatch | {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} |
in_layout | bool |
joinstyle | {'miter', 'round', 'bevel'} |
label | object |
linestyle or ls | {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} |
linewidth or lw | float or None |
path_effects | AbstractPathEffect |
picker | None or bool or float or callable |
rasterized | bool or None |
sketch_params | (scale: float, length: float, randomness: float) |
snap | bool or None |
transform | Transform |
url | str |
visible | bool |
zorder | float |
get_arrowstyle(self)
[source]
Return the arrowstyle object.
get_connectionstyle(self)
[source]
Return the ConnectionStyle
instance.
get_dpi_cor(self)
[source]
dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this.
Returns: |
|
---|
get_mutation_aspect(self)
[source]
Return the aspect ratio of the bbox mutation.
get_mutation_scale(self)
[source]
Return the mutation scale.
Returns: |
|
---|
get_path(self)
[source]
Return the path of the arrow in the data coordinates. Use get_path_in_displaycoord() method to retrieve the arrow path in display coordinates.
get_path_in_displaycoord(self)
[source]
Return the mutated path of the arrow in display coordinates.
set_arrowstyle(self, arrowstyle=None, **kw)
[source]
Set the arrow style. Old attributes are forgotten. Without arguments (or with arrowstyle=None
) returns available box styles as a list of strings.
Parameters: |
|
---|
set_connectionstyle(self, connectionstyle, **kw)
[source]
Set the connection style. Old attributes are forgotten.
Parameters: |
|
---|
set_dpi_cor(self, dpi_cor)
[source]
dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this.
Parameters: |
|
---|
set_mutation_aspect(self, aspect)
[source]
Set the aspect ratio of the bbox mutation.
Parameters: |
|
---|
set_mutation_scale(self, scale)
[source]
Set the mutation scale.
Parameters: |
|
---|
set_patchA(self, patchA)
[source]
Set the tail patch.
Parameters: |
|
---|
set_patchB(self, patchB)
[source]
Set the head patch.
Parameters: |
|
---|
matplotlib.patches.FancyArrowPatch
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.FancyArrowPatch.html