matplotlib.patches.
ArrowStyle
¶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 CurveB ->
head_length=0.4,head_width=0.2 BracketB -[
widthB=1.0,lengthB=0.2,angleB=None CurveFilledB -|>
head_length=0.4,head_width=0.2 CurveA <-
head_length=0.4,head_width=0.2 CurveAB <->
head_length=0.4,head_width=0.2 CurveFilledA <|-
head_length=0.4,head_width=0.2 CurveFilledAB <|-|>
head_length=0.4,head_width=0.2 BracketA ]-
widthA=1.0,lengthA=0.2,angleA=None BracketAB ]-[
widthA=1.0,lengthA=0.2,angleA=None,widthB=1.0,lengthB=0.2,angleB=None Fancy fancy
head_length=0.4,head_width=0.4,tail_width=0.4 Simple simple
head_length=0.5,head_width=0.5,tail_width=0.2 Wedge wedge
tail_width=0.3,shrink_factor=0.5 BarAB |-|
widthA=1.0,angleA=None,widthB=1.0,angleB=None
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.
BarAB
(widthA=1.0, angleA=None, widthB=1.0, angleB=None)¶An arrow with a bar(|) at both ends.
Parameters: | widthA : float, optional, default
angleA : float, optional, default
widthB : float, optional, default
angleB : float, optional, default
|
---|
BracketA
(widthA=1.0, lengthA=0.2, angleA=None)¶An arrow with a bracket(]) at its end.
Parameters: | widthA : float, optional, default
lengthA : float, optional, default
angleA : float, optional, default
|
---|
BracketAB
(widthA=1.0, lengthA=0.2, angleA=None, widthB=1.0, lengthB=0.2, angleB=None)¶An arrow with a bracket(]) at both ends.
Parameters: | widthA : float, optional, default
lengthA : float, optional, default
angleA : float, optional, default
widthB : float, optional, default
lengthB : float, optional, default
angleB : float, optional, default
|
---|
BracketB
(widthB=1.0, lengthB=0.2, angleB=None)¶An arrow with a bracket([) at its end.
Parameters: | widthB : float, optional, default
lengthB : float, optional, default
angleB : float, optional, default
|
---|
Curve
¶A simple curve without any arrow head.
CurveA
(head_length=0.4, head_width=0.2)¶An arrow with a head at its begin point.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
CurveAB
(head_length=0.4, head_width=0.2)¶An arrow with heads both at the begin and the end point.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
CurveB
(head_length=0.4, head_width=0.2)¶An arrow with a head at its end point.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
CurveFilledA
(head_length=0.4, head_width=0.2)¶An arrow with filled triangle head at the begin.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
CurveFilledAB
(head_length=0.4, head_width=0.2)¶An arrow with filled triangle heads at both ends.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
CurveFilledB
(head_length=0.4, head_width=0.2)¶An arrow with filled triangle head at the end.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
|
---|
Fancy
(head_length=0.4, head_width=0.4, tail_width=0.4)¶A fancy arrow. Only works with a quadratic bezier curve.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
tail_width : float, optional, default
|
---|
transmute
(path, mutation_size, linewidth)¶Simple
(head_length=0.5, head_width=0.5, tail_width=0.2)¶A simple arrow. Only works with a quadratic bezier curve.
Parameters: | head_length : float, optional, default
head_width : float, optional, default
tail_width : float, optional, default
|
---|
transmute
(path, mutation_size, linewidth)¶Wedge
(tail_width=0.3, shrink_factor=0.5)¶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.
Parameters: | tail_width : float, optional, default
shrink_factor : float, optional, default
|
---|
transmute
(path, mutation_size, linewidth)¶