Graphviz: How to go from .dot to a graph?

后端 未结 11 1472
傲寒
傲寒 2020-11-27 08:44

I can\'t seem to figure this out. I have a .dot file, which is valid according to the syntax. How do I use graphviz to convert this into an image?

(note that I\'m on

11条回答
  •  Happy的楠姐
    2020-11-27 09:26

    type: dot -Tps filename.dot -o outfile.ps

    If you want to use the dot renderer. There are alternatives like neato and twopi. If graphiz isn't in your path, figure out where it is installed and run it from there.

    You can change the output format by varying the value after -T and choosing an appropriate filename extension after -o.

    If you're using windows, check out the installed tool called GVEdit, it makes the whole process slightly easier.

    Go look at the graphviz site in the section called "User's Guides" for more detail on how to use the tools:

    http://www.graphviz.org/documentation/

    (See page 27 for output formatting for the dot command, for instance)

    http://www.graphviz.org/pdf/dotguide.pdf

提交回复
热议问题