質問

I have taken an initial DOT file and modified the pos attributes of some nodes using pydot. Now I want to render an image file that shows the nodes in their new positions. The catch is, I don't want a layout program to mess with the positions! I just want to see the nodes exactly where the pos attribute indicates. I don't care about how the edges look.

I can produce a DOT file with my positions easily using pydot, but I can't figure out how to make an image file, either in pydot or on the command line with dot. Help would be really appreciated! Thanks!

役に立ちましたか?

解決

dot.write_png('filename.png')? Or is there something I'm missing?

Also, the neato command-line program has a -n option for graph files that already have layout. The program description says it is for undirected graphs, but I tried it with a digraph and it produced the correct result.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top