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)[source]#
Bases:
Polygon
Like Arrow, but lets you set head width and head height independently.
- Parameters:
- x, yfloat
The x and y coordinates of the arrow base.
- dx, dyfloat
The length of the arrow along x and y direction.
- widthfloat, default: 0.001
Width of full arrow tail.
- length_includes_headbool, default: False
True if head is to be counted in calculating the length.
- head_widthfloat or None, default: 3*width
Total width of the full arrow head.
- head_lengthfloat or None, default: 1.5*head_width
Length of arrow head.
- shape{'full', 'left', 'right'}, default: 'full'
Draw the left-half, right-half, or full arrow.
- overhangfloat, default: 0
Fraction that the arrow is swept back (0 overhang means triangular shape). Can be negative or greater than one.
- head_starts_at_zerobool, default: False
If True, the head starts being drawn at coordinate 0 instead of ending at coordinate 0.
- **kwargs
Patch
properties:Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
unknown
bool
antialiased
or aabool or None
CapStyle
or {'butt', 'projecting', 'round'}bool
Patch or (Path, Transform) or None
color
edgecolor
or eccolor or None
facecolor
or fccolor or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
bool
JoinStyle
or {'miter', 'round', 'bevel'}object
linestyle
or ls{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
or lwfloat or None
bool
None or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
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>, 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>)[source]#
Set multiple properties at once.
Supported properties are
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
scalar or None
bool
antialiased
or aabool or None
CapStyle
or {'butt', 'projecting', 'round'}bool
Patch or (Path, Transform) or None
bool
color
unknown
edgecolor
or eccolor or None
facecolor
or fccolor or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
bool
JoinStyle
or {'miter', 'round', 'bevel'}object
linestyle
or ls{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
or lwfloat or None
bool
None or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
(N, 2) array-like
float
- set_data(*, x=None, y=None, dx=None, dy=None, width=None, head_width=None, head_length=None)[source]#
Set
FancyArrow
x, y, dx, dy, width, head_with, and head_length. Values left as None will not be updated.- Parameters:
- x, yfloat or None, default: None
The x and y coordinates of the arrow base.
- dx, dyfloat or None, default: None
The length of the arrow along x and y direction.
- widthfloat or None, default: None
Width of full arrow tail.
- head_widthfloat or None, default: None
Total width of the full arrow head.
- head_lengthfloat or None, default: None
Length of arrow head.