1
Quick Reference provided by vladimir@cs.ualberta.ca (Dec 97)
3
Command-line Invocation
4
-{G,N,E}<attr>=<value> set graph/node/edge attribute
5
-l<file> load graphics library
7
-T<lang> output language (use "dot -T" to see which are supported)
8
ps, hpgl, pcl, mif, pic, gd, gd2, gif, jpeg, png, wbmp, ismap, imap,
10
dot (attributed), canon (prettyprinted),
12
graph SCALE WIDTH HEIGHT
13
node NAME X Y WIDTH HEIGHT LABEL STYLE SHAPE COLOR
14
edge TAIL HEAD N X1 Y1 .. XN YN LABEL XL YL STYLE COLOR
20
digraph G {foo -> bar}
21
connect many nodes at once: {foo bar}->{baz bart}
22
make a chain of links: foo->bar->baz
23
Commas inside [...] and semicolons inside {...} are optional.
24
Quotes around numbers are optional (?)
25
// c++ like comment: to end of line
26
/* c-like comment: between delimiters */
29
Default value is first. Booleans can be true,false,TRUE,FALSE,1,0
31
Graph/Subgraph Attributes
32
bgcolor* background color
34
clusterrank [local], global=none (don't draw box either)
35
compound* has edges from/to cluster (see ltail/lhead below)
36
concentrate merge edges with common head/tail. Doesn't work for short edges
37
(they don't have virtual nodes to merge).
38
layers* id:id:id:id range of layers (docs wrongly say "layerseq")
40
mclimit 1.0 min cross iterations factor
42
nslimit,nslimit1* bound network simplex iterations to n * number-of-nodes
43
ordering [],out edges go out from left to right in creation order.
44
Works for subgraphs too (?)
45
orientation portrait,landscape
46
overlap avoid node overlap (neato only)
47
page unit of pagination (eg 8.5,11in)
48
pagedir* [LRBT][LRBT] set major and minor pagination order
49
quantum* 0.0. If non-zero, make node size a multiple of the quantum
50
rank [],same,min,max,source(abs.min),sink(abs.max). Source and sink only allow
52
rankdir TB,LR top-to-bottom or left-to-right
53
ranksep 0.5in. This is extra to the size of nodes. If "equally",
54
exact_ranksep=TRUE (all ranks are the same distance apart).
55
ratio [], f (add space to achieve width/height=f), fill (add space to achieve
56
size.x/size.y), compress (remove space), auto (reduce by half or print on
58
rotate if 90deg, same as orientation=landscape
59
searchsize* 30 for network simplex algorithm for ranking nodes
60
size of graph (eg 8.5,11in)
61
splines enable curved edges (neato only, dot always had them)
64
fixedsize* don't expand node to accommodate label
65
group* edges connecting nodes in the same group have weight*=100 and
66
xpenalty=CL_CROSS (cluster crossing penalty). Thus, they should go
67
"vertically". Similar to a vertical "rank=same", but only if there's an edge.
68
height,width 0.5,0.75in
69
shape ellipse,polygon,box,circle,diamond,doublecircle,doubleoctagon,egg,
70
hexagon,house,invhouse,invtrapezium,invtriangle,octagon,parallelogram,
71
plaintext,trapezium,triangle,tripleoctagon,
72
record label="v1|..|vn" vertical components, "{h1|..|hn}" horizontal
73
components, can nest recursively.
74
"<p>" port name in component, use as "node:p" for edge head/tail
75
Mcircle,Mdiamond,Msquare (little diagonals),Mrecord (rounded)
76
epsf include shapefile in ps file
77
shapefile for shape=epsf
78
attrs for shape=polygon
80
peripheries how many lines to draw around it
81
orientation (rotation 0..360)
82
regular (height=width)
83
skew left-to-right (eg parallelogram=0.6)
84
distortion top-to-bottom (eg trapezium=-0.4)
85
toplabel,bottomlabel* for Mcircle and Mdiamond (these are AUXLABELS)
88
arrowsize* 1.0 size factor (norm_length=10,norm_width=5,
89
inv_length=6,inv_width=7,dot_radius=2)
90
constraint* if FALSE then xpenalty=weight=0
91
decorate draw line from edge to label
92
dir none,forward,back,both
93
id* doc says it's used to distinguish edge, but program doesn't mention it
94
minlen 1 minimum length (ranks for normal edges,
95
node separation for flat edges)
96
tailclip,headclip [true] whether to clip the endpoint shape.
97
ltail,lhead* cluster name from/to which the edge is clipped.
98
The edge tail/head must be in the named cluster, else gives error.
99
tailport=":t",headport=":h"* same as specifying m:t->n:h instead of simply
100
m->n. Valid ports for polygons are s,e,w,n,se,ne,nw,sw.
101
Note1: polygon_port skips the first char of the name (it assumes the name is
102
of the form ":t" or ":h").
103
Note2: the graph parser in libgraph allows for complex port names of the
104
form `:(x,y)' and `@angle', and passes them unchanged. dot doesn't support
106
weight importance for mincross(?)
107
arrowhead,arrowtail+ none,normal,inv,dot,odot,invdot,invodot.
108
headlabel,taillabel+ these are placed a fixed offset from the edge port and no
109
allowance is made for their size, so they better be short. Don't work for
111
headurl,tailurl for imap (by default, uses the url attribute).
112
portsonly+ draw only the arrows and labels, not the edge itself.
113
labeldistance+ 1.0 factor. port_label_distance=10: from port to {head,tai}label
114
labelangle+ -25 degrees. pos is CCW, neg is CW.
115
labelfontcolor,labelfontname,labelfontsize+ for {head,tail}label
116
samehead,sametail+ aim edges with the same value of this attr to the same port,
117
being the average of their natural landing points.
118
sameheadslope,sametailslope+ constrain the edge end to the average slope of
120
samearrowhead,samearrowtail+ share the arrow of another edge in the group.
121
Specify arrowhead for one of the edges, and samearrowhead for it and all
122
others who should share that arrow. The shared arrow will be drawn at the
123
average slope for the group. Not supported for -Tplain and -Tattributed_dot,
124
because they cannot specify arrows separate from the edge spline.
125
BUG: does not work with label (ports are not respected).
126
BUG: sameheadslope is not respected for half the edges when samearrowhead is
130
color name (black,white,red,green,...) or "hue,saturation,brightness"
131
comment* of object in ps/mif file
133
fontname {times,helvetica,courier,palatino}-{roman,bold,italic|oblique,
134
bolditalic|boldoblique},zapfdingbats,symbol, stick,stickcw (internal)
136
label use \n\l\r for centered/left/right lines. Subgraph labels work only for
137
clusters. Use \N to include the node name.
138
layer [],all,all:id,id:all,id:id. Range of layers where this element appears.
139
showboxes* (debugging) show spline boxes (1=before, 2=after fitsplines)
140
style [],bold,dashed,dotted,filled,invis,unfilled,solid,"any ps command".
141
For node: rounded, diagonals
142
url for imap/ismap. Graph: default url, node: node's region url (use \N to
143
include the node name), edge: only with imap.
145
Output Attributes (-Tdot, -Tplain)
146
node: pos, rects (record rectangles), width, height,
147
edge: pos="s,x0,y0;x1,y1;...;e,xn,yn", lp (label pos),
148
graph: lp (label pos), bb (bounding box)