Bases: matplotlib.patches._Style
ArrowStyle
is a container class which defines several arrowstyle classes, which is used to create an arrow path along a given path. These are mainly used with FancyArrowPatch
.
A arrowstyle object can be either created as:
ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
or:
ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
or:
ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")
The following classes are defined
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 |
| head_length=0.5, head_width=0.5, tail_width=0.2 |
Fancy |
| head_length=0.4, head_width=0.4, tail_width=0.4 |
Wedge |
| tail_width=0.3, shrink_factor=0.5 |
An instance of any arrow style class is a callable object, whose call signature is:
__call__(self, path, mutation_size, linewidth, aspect_ratio=1.)
and it returns a tuple of a Path
instance and a boolean value. path is a Path
instance along which the arrow will be drawn. mutation_size and aspect_ratio have the same meaning as in BoxStyle
. linewidth is a line width to be stroked. This is meant to be used to correct the location of the head so that it does not overshoot the destination point, but not all classes support it.
Return the instance of the subclass with the given style name.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with vertical bars |
at both ends.
Width of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with an outward square bracket at its start.
Width of the bracket.
Length of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with outward square brackets at both ends.
Width of the bracket.
Length of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with an outward square bracket at its end.
Width of the bracket.
Length of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with an outward square bracket at its start and a head at the end.
Width of the bracket.
Length of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
A simple curve without any arrow head.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with a head at its begin point.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with heads both at the begin and the end point.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with a head at its end point.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with an outward square bracket at its end and a head at the start.
Width of the bracket.
Length of the bracket.
Orientation of the bracket, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with filled triangle head at the begin.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with filled triangle heads at both ends.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Curve
An arrow with filled triangle head at the end.
Length of the arrow head, relative to mutation_scale.
Width of the arrow head, relative to mutation_scale.
Width of the bracket at the beginning of the arrow
Width of the bracket at the end of the arrow
Length of the bracket at the beginning of the arrow
Length of the bracket at the end of the arrow
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
Orientation of the bracket at the beginning, as a counterclockwise angle. 0 degrees means perpendicular to the line.
The mutation_size for the beginning bracket
The mutation_size for the end bracket
Bases: matplotlib.patches.ArrowStyle._Base
A fancy arrow. Only works with a quadratic Bezier curve.
Length of the arrow head.
Width of the arrow head.
Width of the arrow tail.
The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length.
Bases: matplotlib.patches.ArrowStyle._Base
A simple arrow. Only works with a quadratic Bezier curve.
Length of the arrow head.
Width of the arrow head.
Width of the arrow tail.
The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length.
Bases: matplotlib.patches.ArrowStyle._Base
Wedge(?) shape. Only works with a quadratic Bezier curve. The begin point has a width of the tail_width and the end point has a width of 0. At the middle, the width is shrink_factor*tail_width.
Width of the tail.
Fraction of the arrow width at the middle point.
The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length.
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.patches.ArrowStyle.html