.TH DOT 1 "23 August 2004" \*(eX
.SH NAME
dot \- filter for drawing directed graphs
.br
neato \- filter for drawing undirected graphs
.br
twopi \- filter for radial layouts of graphs
.br
circo \- filter for circular layout of graphs
.br
fdp \- filter for drawing undirected graphs
.br
sfdp \- filter for drawing large undirected graphs
.SH SYNOPSIS
\fBdot\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.br
\fBneato\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-n\fR[\fB1\fR|\fB2\fR]]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.br
\fBtwopi\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.br
\fBcirco\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.br
\fBfdp\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.br
\fBsfdp\fR
[\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
[\fB\-T\fIlang\fR]
[\fB\-l\fIlibfile\fR]
[\fB\-o\fIoutfile\fR]
[\fB\-K\fIlayout\fR]
[\fB\-O\fR]
[\fB\-P\fR]
[\fB\-v\fR]
[\fB\-V\fR]
[files]
.SH DESCRIPTION
.I dot
draws directed graphs.  It works well on DAGs and other graphs
that can be drawn as hierarchies.
It reads attributed graph files and writes drawings.
By default, the output format
.I dot
is the input file with layout coordinates appended.
.PP
.I neato
draws undirected graphs using ``spring'' models (see Kamada and Kawai,
Information Processing Letters 31:1, April 1989).  Input files must be
formatted in the
.I dot
attributed graph language.
By default, the output of
.I neato
is the input graph with layout coordinates appended.
.PP
.I twopi
draws graphs using a radial layout (see G. Wills,
Symposium on Graph Drawing GD'97, September, 1997).
Basically, one node is chosen as the center and put at the origin.
The remaining nodes are placed on a sequence of concentric circles
centered about the origin, each a fixed radial distance from the
previous circle.
All nodes distance 1 from the center are placed on the first circle;
all nodes distance 1 from a node on the first circle are placed on
the second circle; and so forth.
.PP
.I circo
draws graphs using a circular layout (see
Six and Tollis, GD '99 and ALENEX '99, and
Kaufmann and Wiese, GD '02.)
The tool identifies biconnected components and draws the nodes of
the component on a circle. The block\(hycutpoint tree
is then laid out using a recursive radial algorithm. Edge
crossings within a circle are minimized by placing as many edges on
the circle's perimeter as possible.
In particular, if the component is outerplanar, the component will
have a planar layout.
.PP
If a node belongs to multiple non\(hytrivial biconnected components,
the layout puts the node in one of them. By default, this is the first
non\(hytrivial component found in the search from the root component.
.PP
.I fdp
draws undirected graphs using a ``spring'' model. It relies on a
force\(hydirected approach in the spirit of Fruchterman and Reingold
(cf. Software\(hyPractice & Experience 21(11), 1991, pp. 1129\(hy1164).
.PP
.I sfdp
also draws undirected graphs using the ``spring'' model described
above, but it uses a multi-scale approach to produce layouts
of large graphs in a reasonably short time.
.SH OUTPUT FORMATS
Dot uses an extensible plugin mechanism for its output renderers,
so to see what output formats your installation of dot supports
you can use ``dot \-Txxx'' (where xxx is an unlikely format)
and check the warning message.
Also, The plugin mechanism supports multiple implementations
of the output formats.
To see what variants are available, use, for example: ``dot \-Tpng:''
and to force a particular variant, use, for example: ``dot \-Tpng:gd''
.P
Traditionally, dot supports the following:
\fB\-Tps\fP (PostScript),
\fB\-Tsvg\fP \fB\-Tsvgz\fP (Structured Vector Graphics),
\fB\-Tfig\fP (XFIG graphics),
\fB\-Tmif\fP (FrameMaker graphics),
\fB\-Thpgl\fP (HP pen plotters), and \fB\-Tpcl\fP (Laserjet printers),
\fB\-Tpng\fP \fB\-Tgif\fP (bitmap graphics),
\fB\-Tdia\fP (GTK+ based diagrams),
\fB\-Timap\fP (imagemap files for httpd servers for each node or edge
that has a non\(hynull "href" attribute.),
\fB\-Tcmapx\fP (client\(hyside imagemap for use in html and xhtml).
Additional less common or more special\(hypurpose output formats
can be found at http://www.graphviz.org/cvs/doc/info/output.html.)
.P
Alternative plugins providing support for a given output format
can be found from the error message resulting from appending a ':' to the format. e.g. \fB-Tpng:\fP
The first plugin listed is always the default.
.P
The \fB\-P\fP switch can be used to produce a graph of all output variants supported by plugins in the local installation of graphviz.
.SH GRAPH FILE LANGUAGE
Here is a synopsis of the graph file language, traditionally using the extension \fB.dot\fR, for graphs:
.PP
[\fBstrict\fR] (\fBgraph\fR|\fBdigraph\fR) \fIname\fP { \fIstatement\(hylist\fP }\fR
.br 
Is the top level graph. If the graph is \fBstrict\fR then multiple edges are
not allowed between the same pairs of nodes.
If it is a directed graph, indicated by \fBdigraph\fR,
then the \fIedgeop\fR must be "\->". If it is an undirected \fBgraph\fR
then the \fIedgeop\fR must be "\-\-".
Statements may be:
.PP
\fIname\fB=\fIval\fB;\fR
.br
\fBnode [\fIname\fB=\fIval\fB];\fR
.br
\fBedge [\fIname\fB=\fIval\fB];\fR
.br
Set default graph, node, or edge attribute \fIname\fP to \fIval\fP.
Any subgraph, node, or edge appearing after this inherits the new
default attributes.
.PP
\fBn0 [\fIname0=val0,name1=val1,...\fB];\fR
Creates node \fBn0\fP (if it does not already exist)
and sets its attributes according to the optional list. 
.PP
\fBn0 \fIedgeop\fR n1 \fIedgeop\fR \fI...\fB \fIedgeop\fR nn [\fIname0=val0,name1=val1,...\fB];\fR
.br
Creates edges between nodes \fBn0\fP, \fBn1\fP, ..., \fBnn\fP and sets
their attributes according to the optional list.
Creates nodes as necessary.
.PP
[\fBsubgraph \fIname\fB] { \fIstatement\(hylist \fB}\fR
.br
Creates a subgraph.  Subgraphs may be used in place
of \fBn0\fP, ..., \fBnn\fP in the above statements to create edges.
[\fBsubgraph \fIname\fR] is optional;
if missing, the subgraph is assigned an internal name. 
.PP
Comments may be /*C\(hylike*/ or //C++\(hylike.

.PP
Attribute names and values are ordinary (C\(hystyle) strings.
The following sections describe attributes that control graph layout.

.SH "GRAPH ATTRIBUTES"
.PP
\fBsize="\fIx,y\fP"\fR sets bounding box of drawing in inches.
.PP
\fBpage="\fIx,y\fP"\fR sets the PostScript pagination unit.
.PP
\fBratio=\fIf\fR sets the aspect ratio to \fIf\fP which may be
a floating point number, or one of the keywords \fBfill\fP,
\fBcompress\fP, or \fBauto\fP.
.PP
\fBlayout=\fIengine\fR indicates the preferred layout engine ("dot", "neato", fdp" etc) overriding the default from the basename of the command or the -K commandline option.
.PP
\fBmargin=\fIf\fR sets the page margin (included in the page size).
.PP
\fBnodesep=\fIf\fR sets the minimum separation between nodes.
.PP
\fBranksep=\fIf\fR sets the minimum separation between ranks.
.PP
\fBordering=out\fR constrains order of out\(hyedges in a subgraph
according to their file sequence.
.PP
\fBrankdir=LR|RL|BT\fR requests a left\(hyto\(hyright, right\(hyto\(hyleft, or bottom\(hyto\(hytop, drawing.
.PP
\fBpagedir=\fR[TBLR][TBLR] sets the major and minor order of pagination.
.PP
\fBrank=same\fR (or \fBmin\fP or \fBmax\fP) in a subgraph
constrains the rank assignment of its nodes.   If a subgraph's
name has the prefix \fBcluster\fP, its nodes are drawn in
a distinct rectangle of the layout.  Clusters may be nested.
.PP
\fBrotate=90\fR sets landscape mode. 
(\fBorientation=land\fR is backward compatible but obsolete.)
.PP
\fBcenter=\fIn\fR a non\(hyzero value centers the drawing on the page.
.PP
\fBnslimit=\fIf\fR or \fBmclimit=\fIf\fR adjusts the bound on the
number of network simplex or mincross iterations by the given ratio.
For example, \fBmclimit=2.0\fP runs twice as long.
.PP
\fBlayers="\fIid:id:id:id\fR" is a sequence of layer identifiers for
overlay diagrams.  The PostScript array variable \fIlayercolorseq\fR
sets the assignment of colors to layers. The least index is 1 and 
each element must be a 3\(hyelement array to be interpreted as a color coordinate.
.PP
\fBcolor=\fIcolorvalue\fR sets foreground color (\fBbgcolor\fP for background).
.PP
\fBhref=\fI"url"\fR the default url for image map files; in PostScript files,
the base URL for all relative URLs, as recognized by Acrobat Distiller
3.0 and up.
.PP
\fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
.PP
\fBstylesheet=\fI"file.css"\fR includes a reference to a stylesheet
in \-Tsvg and \-Tsvgz outputs.  Ignored by other formats.
.PP
\fBsplines\fR. If set to \fItrue\fR, edges are
drawn as splines.
If set to \fIpolyline\fR, edges are 
drawn as polylines.
If set to \fIortho\fR, edges are 
drawn as orthogonal polylines.
In all of these cases, the nodes may not overlap.
If \fBsplines=\fIfalse\fR or \fBsplines=\fIline\fR, edges are 
drawn as line segments.
The default is \fItrue\fR for dot, and \fIfalse\fR for all other layouts.

.PP
\fB(neato\(hyspecific attributes)\fR
.br
\fBstart=\fIval\fR.  Requests random initial placement and seeds
the random number generator.  If \fIval\fP is not an integer,
the process ID or current time is used as the seed.
.PP
\fBepsilon=\fIn\fR.  Sets the cutoff for the solver.
The default is 0.1.

.PP
\fB(twopi\(hyspecific attributes)\fR
.br
\fBroot=\fIctr\fR. This specifies the node to be used as the center of
the layout. If not specified, \fItwopi\fP will randomly pick one of the
nodes that are furthest from a leaf node, where a leaf node is a node
of degree 1. If no leaf nodes exists, an arbitrary node is picked as center.
.PP
\fBranksep=\fIval\fR. Specifies the radial distance in inches between
the sequence of rings. The default is 0.75.
.PP
\fBoverlap=\fImode\fR. This specifies what \fItwopi\fP should do if
any nodes overlap. If mode is \fI"false"\fP, the program uses Voronoi
diagrams to adjust the nodes to eliminate overlaps. If mode is \fI"scale"\fP,
the layout is uniformly scaled up, preserving node sizes, until nodes no
longer overlap. The latter technique removes overlaps while preserving
symmetry and structure, while the former removes overlaps more compactly
but destroys symmetries.
If mode is \fI"true"\fP (the default), no repositioning is done.

.PP
\fB(circo\(hyspecific attributes)\fR
.br
\fBroot=\fInodename\fR. Specifies the name of a node occurring in the
root block. If the graph is disconnected, the \fBroot\fP node attribute
can be used to specify additional root blocks.
.PP
\fBmindist=\fIvalue\fR. Sets the minimum separation between all nodes. If not
specified then \fIcirco\fP uses a default value of 1.0.

.PP
\fB(fdp\(hyspecific attributes)\fR
.br
\fBK=\fIval\fR. Sets the default ideal node separation
in the layout.
.PP
\fBmaxiter=\fIval\fR. Sets the maximum number of iterations used to
layout the graph.
.PP
\fBstart=\fIval\fR. Adjusts the random initial placement of nodes
with no specified position.  If \fIval\fP is is an integer,
it is used as the seed for the random number generator.
If \fIval\fP is not an integer, a random system\(hygenerated integer,
such as the process ID or current time, is used as the seed.
.PP

.SH "NODE ATTRIBUTES"
.PP
\fBheight=\fId\fR or \fBwidth=\fId\fR sets minimum height or width.
Adding \fBfixedsize=true\fP forces these to be the actual size
(text labels are ignored).
.PP
\fBshape=record polygon epsf \fIbuiltin_polygon\fR
.br
\fIbuiltin_polygon\fR is one of: \fBplaintext ellipse oval circle egg 
triangle box diamond trapezium parallelogram house hexagon octagon
note tab box3d component.\fR
(Polygons are defined or mod