Home | Trees | Index | Help |
|
---|
|
A dot
directed graph. The contents of the graph are
constructed from the following instance variables:
- nodes: A list of DotGraphNodes, encoding the nodes that are present in the graph. Each node is characterized a set of attributes, including an optional label.
- edges: A list of DotGraphEdges, encoding the edges that are present in the graph. Each edge is characterized by a set of attributes, including an optional label.
- node_defaults: Default attributes for nodes.
- edge_defaults: Default attributes for edges.
- body: A string that is appended as-is in the body of the graph. This can be used to build more complex dot graphs.
The link() method can be used to resolve crossreference links
within the graph. In particular, if the 'href' attribute of any
node or edge is assigned a value of the form <name>
, then it
will be replaced by the URL of the object with that name. This
applies to the body as well as the nodes and edges.
To render the graph, use the methods write() and render(). Usually, you should call link() before you render the graph.
|
|||
__init__(self,
title,
body='',
node_defaults=None,
edge_defaults=None,
caption=None)
Create a new DotGraph. |
|||
to_html(self,
image_file,
image_url,
center=True)
Return the HTML code that should be uesd to display this graph (including a client-side image map). |
|||
link(self,
docstring_linker)
Replace any href attributes whose value is <name> with the url of the object whose name is <name>. |
|||
_link_href(self,
attribs,
docstring_linker)
Helper for link() |
|||
write(self,
filename,
language='gif')
Render the graph using the output format language , and write
the result to filename .
|
|||
render(self,
language='gif')
Use the dot command to render this graph, using the output format language .
|
|||
_run_dot(self, *options) | |||
to_dotfile(self)
Return the string contents of the dot file that should be used to render this graph. |
|
|||
_uids | A set of all uids that that have been generated, used to ensure that each new graph has a unique uid. | ||
DEFAULT_NODE_DEFAULTS | |||
DEFAULT_EDGE_DEFAULTS |
|
|||
title | The title of the graph. | ||
caption | A caption for the graph. | ||
nodes | A list of the nodes that are present in the graph. | ||
edges | A list of the edges that are present in the graph. | ||
body | A string that should be included as-is in the body of the graph. | ||
node_defaults | Default attribute values for nodes. | ||
edge_defaults | Default attribute values for edges. | ||
uid | A unique identifier for this graph. |
|
|
|
|
|
language , and write
the result to filename .
|
language . Return the result as a string, or None
if the rendering failed.
|
|
|
|
_uidsA set of all uids that that have been generated, used to ensure that each new graph has a unique uid.
|
DEFAULT_NODE_DEFAULTS
|
DEFAULT_EDGE_DEFAULTS
|
|
titleThe title of the graph. |
captionA caption for the graph. |
nodesA list of the nodes that are present in the graph.
|
edgesA list of the edges that are present in the graph.
|
bodyA string that should be included as-is in the body of the graph.
|
node_defaultsDefault attribute values for nodes. |
edge_defaultsDefault attribute values for edges. |
uidA unique identifier for this graph. This can be used as a filename when rendering the graph. No two DotGraphs will have the same uid. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 3.0alpha2 on Tue Apr 11 17:34:22 2006 | http://epydoc.sf.net |