toyplot.scenegraph module¶
Functionality for managing scene graphs.
Note that the scenegraph is an internal implementation detail for developers adding new functionality to Toyplot, casual Toyplot users will never need to work with it.
- class toyplot.scenegraph.AdjacencyList[source]¶
Bases:
object
Adjaceny list representation for a directed graph.
- class toyplot.scenegraph.SceneGraph[source]¶
Bases:
object
Collection of graphs representing semantic relationships among a (small number) of canvas objects.
- add_edge(source, relationship, target)[source]¶
Add an edge of type relationship from source to target.
- remove_edge(source, relationship, target)[source]¶
Remove an edge of type relationship from source to target, if one exists.
- source(relationship, target)[source]¶
Return a single node that is connected to target via an incoming edge of type relationship.
Raises an exception if there isn’t exactly one incoming edge of type relationship.