class documentation
class AbstractEdgeDrawer:
Known subclasses: igraph.drawing.cairo.edge.AbstractCairoEdgeDrawer
, igraph.drawing.matplotlib.edge.MatplotlibEdgeDrawer
, igraph.drawing.plotly.edge.PlotlyEdgeDrawer
Abstract edge drawer object from which all concrete edge drawer implementations are derived.
Method | draw |
Draws a directed edge. |
Method | draw |
Draws an undirected edge. |
Method | get |
returns the position where the label of an edge should be drawn. the default implementation returns the midpoint of the edge and an alignment that tries to avoid overlapping the label with the edge. |
Method | get |
Get the rotation angle of the label to align with the edge. |
Static Method | _curvature |
Converts values given to the 'curved' edge style argument in plotting calls to floating point values. |
overridden in
igraph.drawing.cairo.edge.AlphaVaryingEdgeDrawer
, igraph.drawing.cairo.edge.CairoArrowEdgeDrawer
, igraph.drawing.cairo.edge.TaperedEdgeDrawer
, igraph.drawing.matplotlib.edge.MatplotlibEdgeDrawer
, igraph.drawing.plotly.edge.PlotlyEdgeDrawer
Draws a directed edge.
Parameters | |
edge | the edge to be drawn. Visual properties of the edge are defined by the attributes of this object. |
src | the source vertex. Visual properties are defined by the attributes of this object. |
dest | the source vertex. Visual properties are defined by the attributes of this object. |
overridden in
igraph.drawing.cairo.edge.AbstractCairoEdgeDrawer
, igraph.drawing.matplotlib.edge.MatplotlibEdgeDrawer
, igraph.drawing.plotly.edge.PlotlyEdgeDrawer
Draws an undirected edge.
Parameters | |
edge | the edge to be drawn. Visual properties of the edge are defined by the attributes of this object. |
src | the source vertex. Visual properties are defined by the attributes of this object. |
dest | the source vertex. Visual properties are defined by the attributes of this object. |
returns the position where the label of an edge should be drawn. the default implementation returns the midpoint of the edge and an alignment that tries to avoid overlapping the label with the edge.
Parameters | |
edge | the edge to be drawn. visual properties of the edge are defined by the attributes of this object. |
src | the source vertex. visual properties are given again as attributes. |
dest | the target vertex. visual properties are given again as attributes. |
Returns | |
a tuple containing two more tuples: the desired position of the label and the desired alignment of the label, where the position is given as c{(x, y)} and the alignment is given as c{(horizontal, vertical)}. members of the alignment tuple are taken from constants in the l{textalignment} class. |
Get the rotation angle of the label to align with the edge.
Parameters | |
edge | the edge to be drawn. visual properties of the edge are defined by the attributes of this object. |
src | the source vertex. visual properties are given again as attributes. |
dest | the target vertex. visual properties are given again as attributes. |
Returns | |
a float with the desired angle, in degrees (out of 360). |