matplotlib 3.5.1

Other ParametersParameters
__init__(self, posA=None, posB=None, path=None, arrowstyle='simple', connectionstyle='arc3', patchA=None, patchB=None, shrinkA=2, shrinkB=2, mutation_scale=1, mutation_aspect=1, dpi_cor=<deprecated parameter>, **kwargs)

Other Parameters

**kwargs : `.Patch` properties, optional

Here is a list of available .Patch properties:

Properties: :

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: unknown animated: bool antialiased or aa: bool or None capstyle: .CapStyle or {'butt', 'projecting', 'round'} clip_box: .Bbox clip_on: bool clip_path: Patch or (Path, Transform) or None color: color edgecolor or ec: color or None facecolor or fc: color or None figure: .Figure fill: bool gid: str hatch: {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} in_layout: bool joinstyle: .JoinStyle or {'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 sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform: .Transform url: str visible: bool zorder: float

In contrast to other patches, the default capstyle and joinstyle for FancyArrowPatch are set to "round" .

Parameters

posA, posB : (float, float), default: None

(x, y) coordinates of arrow tail and arrow head respectively.

path : `~matplotlib.path.Path`, default: None

If provided, an arrow is drawn along this path and patchA, patchB, shrinkA, and shrinkB are ignored.

arrowstyle : str or `.ArrowStyle`, default: 'simple'

The .ArrowStyle with which the fancy arrow is drawn. If a string, it should be one of the available arrowstyle names, with optional comma-separated attributes. The optional attributes are meant to be scaled with the mutation_scale. The following arrow styles are available:

============= ========== =============================================================================================================================== Class Name Attrs ============= ========== =============================================================================================================================== Curve - None CurveA <- head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None CurveB -> head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None CurveAB <-> head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None CurveFilledA <|- head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None CurveFilledB -|> head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None CurveFilledAB <|-|> head_length=0.4, head_width=0.2, widthA=1.0, widthB=1.0, lengthA=0.2, lengthB=0.2, angleA=0, angleB=0, scaleA=None, scaleB=None BracketA ]- widthA=1.0, lengthA=0.2, angleA=0 BracketB -[ widthB=1.0, lengthB=0.2, angleB=0 BracketAB ]-[ widthA=1.0, lengthA=0.2, angleA=0, widthB=1.0, lengthB=0.2, angleB=0 BarAB |-| widthA=1.0, angleA=0, widthB=1.0, angleB=0 BracketCurve ]-> widthA=1.0, lengthA=0.2, angleA=None CurveBracket <-[ widthB=1.0, lengthB=0.2, angleB=None Simple simple head_length=0.5, head_width=0.5, tail_width=0.2 Fancy fancy head_length=0.4, head_width=0.4, tail_width=0.4 Wedge wedge tail_width=0.3, shrink_factor=0.5 ============= ========== ===============================================================================================================================

connectionstyle : str or `.ConnectionStyle` or None, optional, default: 'arc3'

The .ConnectionStyle with which posA and posB are connected. If a string, it should be one of the available connectionstyle names, with optional comma-separated attributes. The following connection styles are available:

====== ========== ================================================= Class Name Attrs ====== ========== ================================================= Arc3 arc3 rad=0.0 Angle3 angle3 angleA=90, angleB=0 Angle angle angleA=90, angleB=0, rad=0.0 Arc arc angleA=0, angleB=0, armA=None, armB=None, rad=0.0 Bar bar armA=0.0, armB=0.0, fraction=0.3, angle=None ====== ========== =================================================

patchA, patchB : `.Patch`, default: None

Head and tail patches, respectively.

shrinkA, shrinkB : float, default: 2

Shrinking factor of the tail and head of the arrow respectively.

mutation_scale : float, default: 1

Value with which attributes of arrowstyle (e.g., head_length) will be scaled.

mutation_aspect : None or float, default: None

The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it.

dpi_cor : float, default: 1

dpi_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this. Deprecated.

There are two ways for defining an arrow:

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/patches.py#4160
type: <class 'function'>
Commit: