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 Simplesimple
head_length=0.5, head_width=0.5, tail_width=0.2 Fancyfancy
head_length=0.4, head_width=0.4, tail_width=0.4 Wedgewedge
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.
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
.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.patches.FancyArrowPatch.__init__
networkx.drawing.nx_pylab.draw_networkx
matplotlib.patches.ArrowStyle
networkx.drawing.nx_pylab.draw_networkx_edges
matplotlib.patches.FancyArrowPatch
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