- graphviz_layout(G, prog='neato', root=None)¶
Create node positions using Pydot and Graphviz.
Returns a dictionary of positions keyed by node.
- GNetworkX Graph
The graph for which the layout is computed.
- progstring (default: ‘neato’)
The name of the GraphViz program to use for layout. Options depend on GraphViz version but may include: ‘dot’, ‘twopi’, ‘fdp’, ‘sfdp’, ‘circo’
- rootNode from G or None (default: None)
The node of G from which to start some layout algorithms.
- Dictionary of (x, y) positions keyed by node.
This is a wrapper for pydot_layout.
>>> G = nx.complete_graph(4) >>> pos = nx.nx_pydot.graphviz_layout(G) >>> pos = nx.nx_pydot.graphviz_layout(G, prog="dot")