python-igraph API reference

List of all classes, functions and methods in python-igraph

class documentation

Abstract edge drawer object from which all concrete edge drawer implementations are derived.

Method __init__ Constructs the edge drawer.
Instance Variable context Undocumented
Instance Variable palette Undocumented
Instance Variable VisualEdgeBuilder Undocumented
Method draw_directed_edge Draws a directed edge.
Method draw_loop_edge Draws a loop edge.
Method draw_undirected_edge Draws an undirected edge.
Method get_label_position 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.
Static Method _curvature_to_float Converts values given to the 'curved' edge style argument in plotting calls to floating point values.
Method _construct_visual_edge_builder Construct the visual edge builder that will collect the visual attributes of an edge when it is being drawn.
def __init__(self, context, palette):

Constructs the edge drawer.

Parameterscontexta Cairo context on which the edges will be drawn.
palettethe palette that can be used to map integer color indices to colors when drawing edges
context =

Undocumented

palette =

Undocumented

VisualEdgeBuilder =

Undocumented

@staticmethod
def _curvature_to_float(value):

Converts values given to the 'curved' edge style argument in plotting calls to floating point values.

def _construct_visual_edge_builder(self):

Construct the visual edge builder that will collect the visual attributes of an edge when it is being drawn.

def draw_directed_edge(self, edge, src_vertex, dest_vertex):

Draws a directed edge.

Parametersedgethe edge to be drawn. Visual properties of the edge are defined by the attributes of this object.
src_vertexthe source vertex. Visual properties are given again as attributes.
dest_vertexthe target vertex. Visual properties are given again as attributes.
def draw_loop_edge(self, edge, vertex):

Draws a loop edge.

The default implementation draws a small circle.

Parametersedgethe edge to be drawn. Visual properties of the edge are defined by the attributes of this object.
vertexthe vertex to which the edge is attached. Visual properties are given again as attributes.
def draw_undirected_edge(self, edge, src_vertex, dest_vertex):

Draws an undirected edge.

The default implementation of this method draws undirected edges as straight lines. Loop edges are drawn as small circles.

Parametersedgethe edge to be drawn. Visual properties of the edge are defined by the attributes of this object.
src_vertexthe source vertex. Visual properties are given again as attributes.
dest_vertexthe target vertex. Visual properties are given again as attributes.
def get_label_position(self, edge, src_vertex, dest_vertex):

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.

Parametersedgethe edge to be drawn. Visual properties of the edge are defined by the attributes of this object.
src_vertexthe source vertex. Visual properties are given again as attributes.
dest_vertexthe target vertex. Visual properties are given again as attributes.
Returnsa tuple containing two more tuples: the desired position of the label and the desired alignment of the label, where the position is given as (x, y) and the alignment is given as (horizontal, vertical). Members of the alignment tuple are taken from constants in the TextAlignment class.
API Documentation for igraph, generated by pydoctor 21.2.2.