NetworkX

Previous topic

networkx.drawing.nx_agraph.graphviz_layout

Next topic

networkx.drawing.nx_pydot.from_pydot

networkx.drawing.nx_agraph.pygraphviz_layout

networkx.drawing.nx_agraph.pygraphviz_layout(G, prog='neato', root=None, args='')

Create node positions for G using Graphviz.

Parameters :

G : NetworkX graph

A graph created with NetworkX

prog : string

Name of Graphviz layout program

root : string, optional

Root node for twopi layout

args : string, optional

Extra arguments to Graphviz layout program

Returns : dictionary

Dictionary of x,y, positions keyed by node.

Examples

>>> G=nx.petersen_graph()
>>> pos=nx.graphviz_layout(G)
>>> pos=nx.graphviz_layout(G,prog='dot')