Dot
From charlesreid1
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
- Graphviz documentation: http://graphviz.org/Documentation.php
- Dot user's manual: http://graphviz.org/pdf/dotguide.pdf
- Directed versus undirected: http://stackoverflow.com/questions/13236975/graphviz-dot-mix-directed-and-undirected
- Summary: for undirected graphs use
graph G {
. For directed graphs usedigraph G {
.
- Summary: for undirected graphs use