Home | Trees | Indices | Help |
---|
|
Interface to pygraphviz AGraph class.
Usage
>>> from networkx import * >>> G=complete_graph(5) >>> A=to_agraph(G) >>> H=from_agraph(A)
Author: Aric Hagberg (hagberg@lanl.gov)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Return a NetworkX XGraph or XDiGraph from a pygraphviz graph. >>> X=from_agraph(A)
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)
|
Return a pygraphviz graph from a NetworkX graph N. If N is a Graph or DiGraph, graphviz attributes can be supplied through the 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_agraph) and then updated with the calling arguments if any. |
Write NetworkX graph G to Graphviz dot format on path. Path can be a string or a file handle. |
Return a NetworkX XGraph or XdiGraph from a dot file on path. Path can be a string or a file handle. |
Create layout using graphviz. Returns a dictionary of positions keyed by node. >>> from networkx import * >>> G=petersen_graph() >>> pos=graphviz_layout(G) >>> pos=graphviz_layout(G,prog='dot') This is a wrapper for pygraphviz_layout. |
Create layout using pygraphviz and graphviz. Returns a dictionary of positions keyed by node. >>> from networkx import * >>> G=petersen_graph() >>> pos=pygraphviz_layout(G) >>> pos=pygraphviz_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 |