pypath.visual.igraph_drawing.DefaultGraphDrawerFFsupport§

class pypath.visual.igraph_drawing.DefaultGraphDrawerFFsupport(context, bbox, vertex_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>, edge_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>, label_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>)[source]§

Bases: AbstractCairoGraphDrawer

Class implementing the default visualisation of a graph.

The default visualisation of a graph draws the nodes on a 2D plane according to a given L{Layout}, then draws a straight or curved edge between nodes connected by edges. This is the visualisation used when one invokes the L{plot()} function on a L{Graph} object.

See L{Graph.__plot__()} for the keyword arguments understood by this drawer.

__init__(context, bbox, vertex_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>, edge_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>, label_drawer_factory=<class 'pypath.visual.igraph_drawing.AbstractCairoGraphDrawer'>)[source]§

Constructs the graph drawer and associates it to the given Cairo context and the given L{BoundingBox}.

@param context: the context on which we will draw @param bbox: the bounding box within which we will draw.

Can be anything accepted by the constructor of L{BoundingBox} (i.e., a 2-tuple, a 4-tuple or a L{BoundingBox} object).

@param vertex_drawer_factory: a factory method that returns an

L{AbstractCairoVertexDrawer} instance bound to a given Cairo context. The factory method must take three parameters: the Cairo context, the bounding box of the drawing area and the palette to be used for drawing colored vertices. The default vertex drawer is L{DefaultVertexDrawer}.

@param edge_drawer_factory: a factory method that returns an

L{AbstractEdgeDrawer} instance bound to a given Cairo context. The factory method must take two parameters: the Cairo context and the palette to be used for drawing colored edges. You can use any of the actual L{AbstractEdgeDrawer} implementations here to control the style of edges drawn by igraph. The default edge drawer is L{ArrowEdgeDrawer}.

@param label_drawer_factory: a factory method that returns a

L{TextDrawer} instance bound to a given Cairo context. The method must take one parameter: the Cairo context. The default label drawer is L{TextDrawer}.

Methods

__init__(context, bbox[, ...])

Constructs the graph drawer and associates it to the given Cairo context and the given L{BoundingBox}.

draw(graph, palette, *args, **kwds)