Help:Graphviz

From CECS wiki
Jump to navigation Jump to search

Graphviz is a graph visualization markup language. Given a list of nodes and connectivities, it can automatically lay out a graph diagram.

Software homepage
http://www.graphviz.org/
wiki extension from wickle.com
possibly better version of this extension from case.edu
Software availability
available for unix, windows, mac
can be installed as a mediawiki extension on request
Other related software
ghostscript, xfig
command to type to run
dot circo neato twopi unflatten fdp
various algorithms for automatic layout and conversion to other formats
dotty lneato
editor / viewer
acyclic tred gvcolor gvpr nop prune sccmap
various filters
View online documentation
software home pages above
man -M /opt/csw/graphviz2/man command
Drawing graphs with dot (PDF)
Location of example files
websites above, especially the gallery.

Examples[edit]

Graphviz diagrams can be embedded directly in the wiki like this:

 <graphviz>
 digraph G {
 rankdir=LR
 hello -> world;
 }
 </graphviz>

<graphviz> digraph G { rankdir=LR hello -> world; } </graphviz>

 <graphviz>
 digraph G {
  1->c; 2->c; 3->c; 4->c; 5->c;
 }
 </graphviz>

<graphviz> digraph G {

1->c; 2->c; 3->c; 4->c; 5->c;

} </graphviz>

See also the gallery linked above.

Additional notes[edit]

Graphviz is available within the wiki by enclosing the program text in the <graphviz> tag. Only the dot layout algorithm is available in the wiki at this time.

From the command line, you can also use the circo and neato alternate layout algorithms, and errors in your diagram will be shown. The wickle version of the wiki graphviz extension only supports dot.

Graphviz can output in several formats including images and postscript. The man page for dot gives details.

Graphs can be automatically generated from other data sources using tools like perl to extract and reformat the data, and then graphviz tools to lay out the drawing. (This can be automated with the make command.)