A connectionstyle object can be either created as:
ConnectionStyle.Arc3(rad=0.2)
or:
ConnectionStyle("Arc3", rad=0.2)
or:
ConnectionStyle("Arc3, rad=0.2")
The following classes are defined
====== ========== ================================================= Class Name Attrs ====== ========== ================================================= Arc3
arc3
rad=0.0 Angle3angle3
angleA=90, angleB=0 Angleangle
angleA=90, angleB=0, rad=0.0 Arcarc
angleA=0, angleB=0, armA=None, armB=None, rad=0.0 Barbar
armA=0.0, armB=0.0, fraction=0.3, angle=None ====== ========== =================================================
An instance of any connection style class is an callable object, whose call signature is:
__call__(self, posA, posB, patchA=None, patchB=None, shrinkA=2., shrinkB=2.)
and it returns a .Path
instance. posA and posB are tuples of (x, y) coordinates of the two points to be connected. patchA (or patchB) is given, the returned path is clipped so that it start (or end) from the boundary of the patch. The path is further shrunk by shrinkA (or shrinkB) which is given in points.
ConnectionStyle
is a container class which defines several connectionstyle classes, which is used to create a path between two points. 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.get_connectionstyle
matplotlib.patches.FancyArrowPatch.__init__
matplotlib.artist.ConnectionPatch.set
matplotlib.patches.ConnectionStyle
networkx.drawing.nx_pylab.draw_networkx_edges
matplotlib.artist.FancyArrowPatch.set
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