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 .
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.
Notes
angleA and angleB specify the orientation of the bracket, as either a
clockwise or counterclockwise angle depending on the arrow type. 0 degrees
means perpendicular to the line connecting the arrow's head and tail.
A fancy arrow. Only works with a quadratic Bézier curve.
Parameters:
head_length : float, default: 0.4
Length of the arrow head.
head_width : float, default: 0.4
Width of the arrow head.
tail_width : float, default: 0.4
Width of the arrow tail.
transmute(path, mutation_size, linewidth)
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 the same length.
A simple arrow. Only works with a quadratic Bézier curve.
Parameters:
head_length : float, default: 0.5
Length of the arrow head.
head_width : float, default: 0.5
Width of the arrow head.
tail_width : float, default: 0.2
Width of the arrow tail.
transmute(path, mutation_size, linewidth)
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 the same length.
classWedge(tail_width=0.3, shrink_factor=0.5)
Bases: _Base
Wedge(?) shape. Only works with a quadratic Bézier curve. The
start 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*x*tail_width.
Parameters:
tail_width : float, default: 0.3
Width of the tail.
shrink_factor : float, default: 0.5
Fraction of the arrow width at the middle point.
transmute(path, mutation_size, linewidth)
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 the same length.