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)¶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: | posA, posB : None, tuple, optional (default: None)
path : None, Path (default: None)
arrowstyle : str or ArrowStyle, optional (default: ‘simple’)
arrow_transmuter :
connectionstyle : str, ConnectionStyle, or None, optional (default: ‘arc3’)
connector :
patchA, patchB : None, Patch, optional (default: None)
shrinkA, shrinkB : scalar, optional (default: 2)
mutation_scale : scalar, optional (default: 1)
mutation_aspect : None, scalar, optional (default: None)
dpi_cor : scalar, optional (default: 1)
|
|---|
Notes
Valid kwargs are:
Property Description agg_filtera filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alphafloat or None animatedbool antialiasedor aabool or None capstyle[‘butt’ | ‘round’ | ‘projecting’] clip_boxa Bboxinstanceclip_onbool clip_path[( Path,Transform) |Patch| None]colormatplotlib color spec containsa callable function edgecoloror ecmpl color spec, None, ‘none’, or ‘auto’ facecoloror fcmpl color spec, or None for default, or ‘none’ for no color figurea Figureinstancefillbool gidan id string hatch[‘/’ | ‘' | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’] joinstyle[‘miter’ | ‘round’ | ‘bevel’] labelobject linestyleor ls[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) | '-'|'--'|'-.'|':'|'None'|' '|'']linewidthor lwfloat or None for default path_effectsAbstractPathEffectpicker[None | bool | float | callable] rasterizedbool or None sketch_params(scale: float, length: float, randomness: float) snapbool or None transformTransformurla url string visiblebool zorderfloat
draw(renderer)¶get_arrowstyle()¶Return the arrowstyle object.
get_connectionstyle()¶Return the ConnectionStyle instance.
get_dpi_cor()¶dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this.
| Returns: | dpi_cor : scalar |
|---|
get_mutation_aspect()¶Return the aspect ratio of the bbox mutation.
get_mutation_scale()¶Return the mutation scale.
| Returns: | scale : scalar |
|---|
get_path()¶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()¶Return the mutated path of the arrow in display coordinates.
set_arrowstyle(arrowstyle=None, **kw)¶Set the arrow style. Old attributes are forgotten. Without arguments
(or with arrowstyle=None) returns available box styles as a list of
strings.
| Parameters: | arrowstyle : None, ArrowStyle, str, optional (default: None)
|
|---|
set_connectionstyle(connectionstyle, **kw)¶Set the connection style. Old attributes are forgotten.
| Parameters: | connectionstyle : None, ConnectionStyle instance, or string
|
|---|
set_dpi_cor(dpi_cor)¶dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this.
| Parameters: | dpi_cor : scalar |
|---|
set_mutation_aspect(aspect)¶Set the aspect ratio of the bbox mutation.
| Parameters: | aspect : scalar |
|---|
set_mutation_scale(scale)¶Set the mutation scale.
| Parameters: | scale : scalar |
|---|
set_patchA(patchA)¶Set the tail patch.
| Parameters: | patchA : Patch
|
|---|
set_patchB(patchB)¶Set the head patch.
| Parameters: | patchB : Patch
|
|---|