The language Dot describes graphs in plain text. It is used with the Graphviz graphic application; both were originally developed at Bell Labs.
Below are a few notes on surprises I had when working with .dot and .svg (“Scalable Vector Graphics”, a standard XML-based format for graphs) files in Python:
- For viewing
.svgfiles, desktop installations of Ubuntu use the Gnome viewer “Eye of GNOME” (eog) by default. - Ubuntu’s (Lucid) server installation of graphviz does not include a viewer by default. You can display
.svgfiles using Firefox; set the browser toabout:configand confirm that you have the settingsvg.smil.enabled;trueand place an entry in your~/.mailcapfile:image/svg+xml; firefoxOf course, you can also install
eogon your server. - The current Mac version of Graphviz (v. 2.28) has no trouble opening a
.dotfile, but apparently it cannot open.svgfiles.
For use within LaTeX documents, it is possible to do everything native packages or (more interestingly) to incorporate Graphviz output by converting it to a native format:
- The native LaTeX tools for producing flowcharts and automata are the
tikzandpstrickspackages. TikZ, which has more comprehensive support, supplies a library calledautomata(see the TikZ manual for detailed instructions. There is also a third library,VauCanSon-G, but it appears to have less functionality. - There is a Python module,
dot2texby Kjell Magne Fauske, that converts.dotand other Graphviz formats to TikZ or pstricks. - Fauske has also written a LaTeX package,
dot2texi, that allows.dot(etc.) graphical output to be embedded directly in a LaTeX document.