tags:

views:

699

answers:

3

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 Windows, not linux)

+2  A: 

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.

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.php

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

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

Paul McMillan
somehow, the GVEdit preview always shows the image to be blank. When I try to save the image, nothing happens.
Rosarch
you have to open the dot file, then click the running person icon to render it.
Paul McMillan
yes, I have done that. then it asks for settings, previews it, but the preview is blank.
Rosarch
Does it do that for the sample files as well? Have you tried changing the rendering mode?
Paul McMillan
A: 
dot -Tps input.dot > output.eps
dot -Tpng input.dot > output.png

PostScript output seems always there. I am not sure if dot has PNG output by default. This may depend on how you have built it.

I've typed this, but nothing happens.
Rosarch
A: 
Seth