python-igraph API reference

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

class documentation

class ShapeDrawerDirectory:

View In Hierarchy

Static class that resolves shape names to their corresponding shape drawer classes.

Classes that are derived from ShapeDrawer in this module are automatically registered by ShapeDrawerDirectory when the module is loaded for the first time.

Class Variable known_shapes Undocumented
Class Method register Registers the given shape drawer class under the given names.
Class Method register_namespace Registers all ShapeDrawer classes in the given namespace
Class Method resolve Given a shape name, returns the corresponding shape drawer class
Class Method resolve_default Given a shape name, returns the corresponding shape drawer class or the given default shape drawer if the shape name is unknown.
known_shapes =

Undocumented

(type: dict)
@classmethod
def register(cls, drawer_class):

Registers the given shape drawer class under the given names.

Parametersdrawer_classthe shape drawer class to be registered
@classmethod
def register_namespace(cls, namespace):

Registers all ShapeDrawer classes in the given namespace

Parametersnamespacea Python dict mapping names to Python objects.
@classmethod
def resolve(cls, shape):

Given a shape name, returns the corresponding shape drawer class

Parametersshapethe name of the shape
Returnsthe corresponding shape drawer class
RaisesValueErrorif the shape is unknown
@classmethod
def resolve_default(cls, shape, default=NullDrawer):

Given a shape name, returns the corresponding shape drawer class or the given default shape drawer if the shape name is unknown.

Parametersshapethe name of the shape
defaultthe default shape drawer to return when the shape is unknown
Returnsthe shape drawer class corresponding to the given name or the default shape drawer class if the name is unknown
API Documentation for igraph, generated by pydoctor 21.2.2.