| | |
- Common
-
- Edge(__builtin__.object, Common)
- Graph(__builtin__.object, Common)
-
- Cluster
- Dot
- Subgraph
- Node(__builtin__.object, Common)
- exceptions.Exception
-
- Error
- __builtin__.object
-
- Edge(__builtin__.object, Common)
- Graph(__builtin__.object, Common)
-
- Cluster
- Dot
- Subgraph
- Node(__builtin__.object, Common)
class Cluster(Graph) |
| |
Class representing a cluster in Graphviz's dot language.
This class implements the methods to work on a representation
of a cluster in Graphviz's dot language.
cluster(graph_name='subG', suppress_disconnected=False, attribute=value, ...)
graph_name:
the cluster's name (the string 'cluster' will be always prepended)
suppress_disconnected:
defaults to false, which will remove from the
cluster any disconnected nodes.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_color, set_fontname
or using the instance's attributes:
Cluster.[attribute name], i.e.
cluster_instance.color, cluster_instance.fontname |
| |
- Method resolution order:
- Cluster
- Graph
- __builtin__.object
- Common
Methods defined here:
- __get_attribute__(self, attr)
- Look for default attributes for this cluster
- __getstate__(self)
- __init__(self, graph_name='subG', suppress_disconnected=False, simplify=False, **attrs)
- __setstate__(self, state)
Data and other attributes defined here:
- attributes = ['pencolor', 'bgcolor', 'labeljust', 'labelloc', 'URL', 'fontcolor', 'fontsize', 'label', 'fontname', 'lp', 'style', 'target', 'color', 'peripheries', 'fillcolor', 'nojustify']
Methods inherited from Graph:
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an edge object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_name(self)
- Get the graph's name.
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_graph_parent(self, parent)
- Sets a graph and its elements to point the the parent.
Any subgraph added to a parent graph receives a reference
to the parent to access some common data.
- set_name(self, graph_name)
- Set the graph's name.
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data and other attributes inherited from Graph:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Graph' objects>
- list of weak references to the object (if defined)
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
|
class Common |
| |
Common information to several classes.
Should not be directly used, several classes are derived from
this one. |
| |
Methods defined here:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes defined here:
- chars_ID = None
- parent_graph = None
|
class Dot(Graph) |
| |
A container for handling a dot language file.
This class implements methods to write and process
a dot language file. It is a derived class of
the base class 'Graph'. |
| |
- Method resolution order:
- Dot
- Graph
- __builtin__.object
- Common
Methods defined here:
- __getstate__(self)
- __init__(self, prog='dot', **args)
- __setstate__(self, state)
- create(self, prog=None, format='ps')
- Creates and returns a Postscript representation of the graph.
create will write the graph to a temporary dot file and process
it with the program given by 'prog' (which defaults to 'twopi'),
reading the Postscript output and returning it as a string is the
operation is successful.
On failure None is returned.
There's also the preferred possibility of using:
create_'format'(prog='program')
which are automatically defined for all the supported formats.
[create_ps(), create_gif(), create_dia(), ...]
- set_prog(self, prog)
- Sets the default program.
Sets the default program in charge of processing
the dot file into a graph.
- write(self, path, prog=None, format='raw')
- Writes a graph to a file.
Given a filename 'path' it will open/create and truncate
such file and write on it a representation of the graph
defined by the dot object and in the format specified by
'format'.
The format 'raw' is used to dump the string representation
of the Dot object, without further processing.
The output can be processed by any of graphviz tools, defined
in 'prog', which defaults to 'dot'
Returns True or False according to the success of the write
operation.
There's also the preferred possibility of using:
write_'format'(path, prog='program')
which are automatically defined for all the supported formats.
[write_ps(), write_gif(), write_dia(), ...]
Data and other attributes defined here:
- formats = ['ps', 'ps2', 'hpgl', 'pcl', 'mif', 'pic', 'gd', 'gd2', 'gif', 'jpg', 'jpeg', 'png', 'wbmp', 'ismap', 'imap', 'cmap', 'cmapx', 'vrml', 'vtx', 'mp', ...]
- progs = None
Methods inherited from Graph:
- __get_attribute__(self, attr)
- Look for default attributes for this graph
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an edge object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_name(self)
- Get the graph's name.
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_graph_parent(self, parent)
- Sets a graph and its elements to point the the parent.
Any subgraph added to a parent graph receives a reference
to the parent to access some common data.
- set_name(self, graph_name)
- Set the graph's name.
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data and other attributes inherited from Graph:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Graph' objects>
- list of weak references to the object (if defined)
- attributes = ['Damping', 'bb', 'center', 'clusterrank', 'compound', 'concentrate', 'defaultdist', 'dim', 'fontpath', 'epsilon', 'layers', 'layersep', 'margin', 'maxiter', 'mclimit', 'mindist', 'pack', 'packmode', 'model', 'page', ...]
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
|
class Edge(__builtin__.object, Common) |
| |
A graph edge.
This class represents a graph's edge with all its attributes.
edge(src, dst, attribute=value, ...)
src: source node's name
dst: destination node's name
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_label, set_fontname
or using the instance's attributes:
Edge.[attribute name], i.e. edge_instance.label, edge_instance.fontname |
| |
- Method resolution order:
- Edge
- __builtin__.object
- Common
Methods defined here:
- __eq__(self, edge)
- Compare two edges.
If the parent graph is directed, arcs linking
node A to B are considered equal and A->B != B->A
If the parent graph is undirected, any edge
connecting two nodes is equal to any other
edge connecting the same nodes, A->B == B->A
- __get_attribute__(self, attr)
- Look for default attributes for this edge
- __getstate__(self)
- __init__(self, src, dst, **attrs)
- __setstate__(self, state)
- get_destination(self)
- Get the edge's destination node name.
- get_source(self)
- Get the edges source node name.
- parse_node_ref(self, node_str)
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- to_string(self)
- Returns a string representation of the edge in dot language.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Edge' objects>
- list of weak references to the object (if defined)
- attributes = ['style', 'target', 'pos', 'layer', 'tooltip', 'color', 'showboxes', 'URL', 'fontcolor', 'fontsize', 'label', 'fontname', 'comment', 'lp', 'arrowhead', 'arrowsize', 'arrowtail', 'constraint', 'decorate', 'dir', ...]
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
|
class Graph(__builtin__.object, Common) |
| |
Class representing a graph in Graphviz's dot language.
This class implements the methods to work on a representation
of a graph in Graphviz's dot language.
graph(graph_name='G', type='digraph', strict=False, suppress_disconnected=False, attribute=value, ...)
graph_name:
the graph's name
type:
can be 'graph' or 'digraph'
suppress_disconnected:
defaults to False, which will remove from the
graph any disconnected nodes.
simplify:
if True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_size, set_fontname
or using the instance's attributes:
Graph.[attribute name], i.e. graph_instance.label, graph_instance.fontname |
| |
- Method resolution order:
- Graph
- __builtin__.object
- Common
Methods defined here:
- __get_attribute__(self, attr)
- Look for default attributes for this graph
- __getstate__(self)
- __init__(self, graph_name='G', graph_type='digraph', strict=False, suppress_disconnected=False, simplify=False, **attrs)
- __setstate__(self, state)
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an edge object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_name(self)
- Get the graph's name.
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_graph_parent(self, parent)
- Sets a graph and its elements to point the the parent.
Any subgraph added to a parent graph receives a reference
to the parent to access some common data.
- set_name(self, graph_name)
- Set the graph's name.
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Graph' objects>
- list of weak references to the object (if defined)
- attributes = ['Damping', 'bb', 'center', 'clusterrank', 'compound', 'concentrate', 'defaultdist', 'dim', 'fontpath', 'epsilon', 'layers', 'layersep', 'margin', 'maxiter', 'mclimit', 'mindist', 'pack', 'packmode', 'model', 'page', ...]
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
|
class Node(__builtin__.object, Common) |
| |
A graph node.
This class represents a graph's node with all its attributes.
node(name, attribute=value, ...)
name: node's name
All the attributes defined in the Graphviz dot language should
be supported. |
| |
- Method resolution order:
- Node
- __builtin__.object
- Common
Methods defined here:
- __get_attribute__(self, attr)
- Look for default attributes for this node
- __getstate__(self)
- __init__(self, name, **attrs)
- __setstate__(self, state)
- get_name(self)
- Get the node's name.
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_name(self, node_name)
- Set the node's name.
- to_string(self)
- Returns a string representation of the node in dot language.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Node' objects>
- list of weak references to the object (if defined)
- attributes = ['showboxes', 'URL', 'fontcolor', 'fontsize', 'label', 'fontname', 'comment', 'root', 'toplabel', 'vertices', 'width', 'z', 'bottomlabel', 'distortion', 'fixedsize', 'group', 'height', 'orientation', 'pin', 'rects', ...]
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
|
class Subgraph(Graph) |
| |
Class representing a subgraph in Graphviz's dot language.
This class implements the methods to work on a representation
of a subgraph in Graphviz's dot language.
subgraph(graph_name='subG', suppress_disconnected=False, attribute=value, ...)
graph_name:
the subgraph's name
suppress_disconnected:
defaults to false, which will remove from the
subgraph any disconnected nodes.
All the attributes defined in the Graphviz dot language should
be supported.
Attributes can be set through the dynamically generated methods:
set_[attribute name], i.e. set_size, set_fontname
or using the instance's attributes:
Subgraph.[attribute name], i.e.
subgraph_instance.label, subgraph_instance.fontname |
| |
- Method resolution order:
- Subgraph
- Graph
- __builtin__.object
- Common
Methods defined here:
- __get_attribute__(self, attr)
- Look for default attributes for this subgraph
- __getstate__(self)
- __init__(self, graph_name='subG', suppress_disconnected=False, simplify=False, **attrs)
- # RMF: subgraph should have all the attributes of graph so it can be passed
# as a graph to all methods
- __setstate__(self, state)
Data and other attributes defined here:
- attributes = ['Damping', 'bb', 'center', 'clusterrank', 'compound', 'concentrate', 'defaultdist', 'dim', 'fontpath', 'epsilon', 'layers', 'layersep', 'margin', 'maxiter', 'mclimit', 'mindist', 'pack', 'packmode', 'model', 'page', ...]
Methods inherited from Graph:
- add_edge(self, graph_edge)
- Adds an edge object to the graph.
It takes a edge object as its only argument and returns
None.
- add_node(self, graph_node)
- Adds a node object to the graph.
It takes a node object as its only argument and returns
None.
- add_subgraph(self, sgraph)
- Adds an edge object to the graph.
It takes a subgraph object as its only argument and returns
None.
- get(self, name)
- Get an attribute value by name.
Given an attribute 'name' it will get its value.
There's always the possibility of using the methods:
get_'name'()
which are defined for all the existing attributes.
- get_edge(self, src, dst)
- Retrieved an edge from the graph.
Given an edge's source and destination the corresponding
Edge instance will be returned.
If multiple edges exist with that source and destination,
a list of Edge instances is returned.
If only one edge exists, the instance is returned.
None is returned otherwise.
- get_edge_list(self)
- Get the list of Edge instances.
This method returns the list of Edge instances
composing the graph.
- get_name(self)
- Get the graph's name.
- get_node(self, name)
- Retrieved a node from the graph.
Given a node's name the corresponding Node
instance will be returned.
If multiple nodes exist with that name, a list of
Node instances is returned.
If only one node exists, the instance is returned.
None is returned otherwise.
- get_node_list(self)
- Get the list of Node instances.
This method returns the list of Node instances
composing the graph.
- get_simplify(self)
- Get whether to simplify or not.
Refer to set_simplify for more information.
- get_strict(self, val)
- Get graph's 'strict' mode (True, False).
This option is only valid for top level graphs.
- get_subgraph(self, name)
- Retrieved a subgraph from the graph.
Given a subgraph's name the corresponding
Subgraph instance will be returned.
If multiple subgraphs exist with the same name, a list of
Subgraph instances is returned.
If only one Subgraph exists, the instance is returned.
None is returned otherwise.
- get_subgraph_list(self)
- Get the list of Subgraph instances.
This method returns the list of Subgraph instances
in the graph.
- get_suppress_disconnected(self, val)
- Get if suppress disconnected is set.
Refer to set_suppress_disconnected for more information.
- get_type(self)
- Get the graph's type, 'graph' or 'digraph'.
- set(self, name, value)
- Set an attribute value by name.
Given an attribute 'name' it will set its value to 'value'.
There's always the possibility of using the methods:
set_'name'(value)
which are defined for all the existing attributes.
- set_graph_parent(self, parent)
- Sets a graph and its elements to point the the parent.
Any subgraph added to a parent graph receives a reference
to the parent to access some common data.
- set_name(self, graph_name)
- Set the graph's name.
- set_simplify(self, simplify)
- Set whether to simplify or not.
If True it will avoid displaying equal edges, i.e.
only one edge between two nodes. removing the
duplicated ones.
- set_strict(self, val)
- Set graph to 'strict' mode.
This option is only valid for top level graphs.
- set_suppress_disconnected(self, val)
- Suppress disconnected nodes in the output graph.
This option will skip nodes in the graph with no incoming or outgoing
edges. This option works also for subgraphs and has effect only in the
current graph/subgraph.
- set_type(self, graph_type)
- Set the graph's type, 'graph' or 'digraph'.
- to_string(self)
- Returns a string representation of the graph in dot language.
It will return the graph and all its subelements in string from.
Data and other attributes inherited from Graph:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Graph' objects>
- list of weak references to the object (if defined)
Methods inherited from Common:
- char_range(self, a, b)
- Generate a list containing a range of characters.
Returns a list of characters starting from 'a' up to 'b'
both inclusive.
- is_ID(self, s)
- Checks whether a string is an dot language ID.
It will check whether the string is solely composed
by the characters allowed in an ID or not.
Data and other attributes inherited from Common:
- chars_ID = None
- parent_graph = None
| |