Home | Trees | Indices | Help |
---|
|
Import and export NetworkX graphs in Graphviz dot format using pydot.
Provides:
- write_dot()
- read_dot()
- graphviz_layout()
- pydot_layout()
- to_pydot()
- from_pydot(0
Either this module or nx_pygraphviz can be used to interface with graphviz.
Author: Aric Hagberg (hagberg@lanl.gov)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Write NetworkX graph G to Graphviz dot format on path. Path can be a string or a file handle. |
Return a NetworkX Graph or DiGraph from a dot file on path. Path can be a string or a file handle. |
Return a NetworkX XGraph or XDiGraph from a pydot graph. >>> X=from_pydot(P)
The XGraph X will have a dictionary X.graph_attr containing the default graphviz attributes for graphs, nodes and edges. Default node attributes will be in the dictionary X.node_attr which is keyed by node. Edge attributes will be returned as edge data in the graph X. If you want a Graph with no attributes attached instead of an XGraph with attributes use >>> G=Graph(X)
Similarly to make a DiGraph from an XDiGraph >>> D=DiGraph(X)
|
Return a pydot graph from a NetworkX graph N. If N is a Graph or DiGraph, graphviz attributes can be supplied through the keyword arguments
node_attr: dictionary keyed by node to node attribute dictionary edge_attr: dictionary keyed by edge tuple to edge attribute dictionary If N is an XGraph or XDiGraph an attempt will be made first to copy properties attached to the graph (see from_pydot) and then updated with the calling arguments, if any. |
Create layout using pydot and graphviz. Returns a dictionary of positions keyed by node. >>> pos=graphviz_layout(G) >>> pos=graphviz_layout(G,prog='dot') This is a wrapper for pydot_layout. |
Create layout using pydot and graphviz. Returns a dictionary of positions keyed by node. >>> pos=pydot_layout(G) >>> pos=pydot_layout(G,prog='dot') |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Sun Aug 17 12:04:43 2008 | http://epydoc.sourceforge.net |