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