NEATO(1) NEATO(1)
NAME
neato - preprocessor for drawing undirected graphs
SYNOPSIS
neato [-Gname=value] [-Nname=value] [-Ename=value] [-Tlang] [-l lib-
file(1,n)] [-n[1|2]] [-o outfile] [-v] [files]
DESCRIPTION
neato draws undirected graphs using ``spring'' models (see Kamada and
Kawai, Information Processing Letters 31:1, April 1989). Input files
must be formatted in(1,8) the dot attributed graph language. By default,
the output of neato is the input graph with layout coordinates
appended. To make Postscript, use the -Tps option. FrameMaker MIF
(-Tmif), HPGL (-Thpgl), and GIF (-Tgif) are other choices.
Here is a brief synopsis of the graph language.
graph name { statement-list } is the top level graph. Statements may
be:
name=val;
node [name=val];
edge [name=val]; Set the default graph, node, or edge attribute name to
val. Any subgraph, node, or edge specified after one of these state-
ments inherits these attributes.
n0 [name0=val0,name1=val1,...]; Creates node n0 if(3,n) it does not exist,
and sets its attributes according to the optional list.
n0 -- n1 -- ... -- nn [name0=val0,name1=val1,...]; Creates edges
between nodes n0, n1, ..., nn and optionally sets the given attributes.
Creates nodes as necessary.
subgraph name { statement-list } Creates a subgraph. A subgraph may
appear in(1,8) place of an individual node within an edge statement. The
subgraph name part is optional. If missing, the subgraph is given an
internal name.
While attribute names and values may be arbitrary strings, certain
fixed attributes control neato's layout algorithm, as next described.
GRAPH ATTRIBUTES
Refer to dot(1) options to control the layout size. In addition, neato
recognizes the following:
start=val. Requests random(3,4,6) initial placement and seeds the random(3,4,6) num-
ber generator. If val is not an integer, the process ID or current
time(1,2,n) is used as the seed.
epsilon=n. Sets the cutoff for the solver. The default is 0.1.
NODE ATTRIBUTES
Refer to dot(1) for options to control node labels, shapes, sizes, col-
ors, fonts, etc.
EDGE ATTRIBUTES
Refer to dot(1) for options to control edge line style and labels. In
addition neato recognizes the following:
w=f sets the weight (spring constant) of an edge to the given floating
point value. The default is 1.0; greater values make the edge tend
more toward its optimal length.
len=f sets the optimal length of an edge. The default is 1.0.
COMMAND LINE OPTIONS
-n[1|2] (no-op) If set(7,n,1 builtins), neato assumes nodes have already been posi-
tioned and all nodes have a pos attribute giving the positions. It
then performs an optional adjustment to remove node-node overlap,
depending on the value of the overlap attribute, computes the edge lay-
outs, depending on the value of the splines attribute, and emits the
graph in(1,8) the appropriate format. If num is supplied, the following
actions occur:
num = 1
Equivalent to -n.
num > 1
Use node positions as specified, with no adjustment to remove node-node
overlaps, and use any edge layouts already specified by the pos
attribute. neato computes an edge layout for any edge that does not
have a pos attribute. As usual, edge layout is guided by the splines
attribute.
-v (verbose) prints delta energy every 100th iteration.
Refer to dot(1) for a description of the other command-line options.
EXAMPLE
graph test123 {
a -- b -- c;
a -- {x y};
x -- c [w=10.0];
x -- y [w=5.0,len=3];
}
CAVEATS
Because unconstrained optimization is employed, node boxes can possibly
overlap or touch unrelated edges. All existing spring embedders seem
to have this limitation.
Apparently reasonable attempts to pin nodes or adjust edge lengths and
weights can cause instability.
SEE ALSO
dot(1) circo(1) twopi(1) fdp(1)
S. C. North, "NEATO User's Manual". Available on research.att.com in(1,8)
dist/drawdag/neatodoc.ps.Z.
12 August 1994 NEATO(1)