I would like to use the QGraphicsView control and QGraphicsScene to layout GraphViz generated graphs using pydot. Is there a way to generate the graph in pydot, have GraphViz do the layout, and then extract the layout information (such as is included in the various output formats generated by pydot.write_xyz)? So far in my testing the get_pos() functions for Nodes, etc. return None.
Asked
Active
Viewed 839 times
1 Answers
2
As you already said, you have to first output the graph with create_dot
to a string, then generate the graph layout by passing that string to graph_from_dot_data
:
graphWithPositions = pydot.graph_from_dot_data(graph.create_dot())

alexisdm
- 29,448
- 6
- 64
- 99