python-igraph API reference

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

class documentation

Abstract class that serves as a base class for anything that draws on a Cairo context within a given bounding box.

A subclass of AbstractCairoDrawer is guaranteed to have an attribute named context that represents the Cairo context to draw on, and an attribute named bbox for the BoundingBox of the drawing area.

Method __init__ Constructs the drawer and associates it to the given Cairo context and the given BoundingBox.
Method bbox​.setter Sets the bounding box of the drawing area where this drawer will draw.
Instance Variable context Undocumented
Property bbox The bounding box of the drawing area where this drawer will draw.
Method _mark​_point Marks the given point with a small circle on the canvas. Used primarily for debugging purposes.
Instance Variable _bbox Undocumented

Inherited from AbstractDrawer:

Method draw Abstract method, must be implemented in derived classes.
def __init__(self, context, bbox):
@bbox.setter
def bbox(self, bbox):
Sets the bounding box of the drawing area where this drawer will draw.
context =

Undocumented

def _mark_point(self, x, y, color=0, size=4):
Marks the given point with a small circle on the canvas. Used primarily for debugging purposes.
Parameters
x:floatthe X coordinate of the point to mark
y:floatthe Y coordinate of the point to mark
color:Union[int, Tuple[float, ...]]the color of the marker. It can be a 3-tuple (RGB components, alpha=0.5), a 4-tuple (RGBA components) or an index where zero means red, 1 means green, 2 means blue and so on.
size:floatthe diameter of the marker.