Dot: Difference between revisions
From charlesreid1
(Created page with "Dot is part of the Graphviz group of programs. It is similar in some ways to LaTeX, in that you start with a text document written with a particular syntax, and then run it thro...") |
No edit summary |
||
| Line 69: | Line 69: | ||
* Dot command line usage: http://www.graphviz.org/doc/info/command.html | * Dot command line usage: http://www.graphviz.org/doc/info/command.html | ||
{{Programs}} | |||
Revision as of 15:58, 28 May 2011
Dot is part of the Graphviz group of programs.
It is similar in some ways to LaTeX, in that you start with a text document written with a particular syntax, and then run it through dot to process it and generate images (pdf, png, jpeg, etc) as the output.
Installation
Dot can be downloaded from here: http://graphviz.org/Download.php
Binaries for most platforms are provided, as well as source code.
Usage
Use the example dot file given below. This should be put in a file like plot.dot or something similar:
digraph G {
CFD
"Governing equations"
CFD -> "Governing equations"
"Discretization of governing equations"
CFD -> "Discretization of governing equations"
CFD -> "Fluid mechanics"
Turbulence
"Fluid mechanics" -> Turbulence
Turbulence -> "Turbulence modeling"
"Turbulence modeling" -> RANS
LES
"Turbulence modeling" -> LES
"Turbulence modeling" -> DNS
}
This file is written in "dot" syntax. Next, this file will be processed through dot. Two things must be specified: first, the format of the output image, and second, the output file.
Use the following command:
dot plot.dot -Tpng -o plot.png
Alternatively, you can specify:
dot plot.dot -Tpng -O
which will use the name of the input file and change the extension to match the format (in this case, plot.png).
Dot supports the following output formats:
- png
- gif
- ps
- svg
- svgz
- fig
and some less common formats:
- cmapx
- imap
- mif
- hpgl
- pcl
See http://www.graphviz.org/cvs/doc/info/output.html for more info.
References
- Dot command line usage: http://www.graphviz.org/doc/info/command.html