Debian Codegraph @

cmd/dot/osage.1

raw
1 .TH OSAGE 1 "27 May 2009"
2 .SH NAME
3 osage \- filter for drawing clustered graphs
4 .SH SYNOPSIS
5 \fBosage\fR
6 [\fB\-\fR(\fBG\fR|\fBN\fR|\fBE\fR)\fIname=value\fR]
7 [\fB\-T\fIlang\fR]
8 [\fB\-l\fIlibfile\fR]
9 [\fB\-o\fIoutfile\fR]
10 [\fB\-O\fR]
11 [\fB\-P\fR]
12 [\fB\-v\fR]
13 [\fB\-V\fR]
14 [files]
15 .SH DESCRIPTION
16 .I osage
17 draws clustered graphs. As input, it takes any graph in the
18 .I dot
19 format. It draws the graph recursively. At each level, there will
20 be a collection of nodes and a collection of cluster subgraphs.
21 The internals of each cluster subgraph are laid out, then the
22 cluster subgraphs and nodes at the current level are positioned
23 relative to each other, treating each cluster subgraph as a node.
24 .P
25 At each level, the nodes and cluster subgraphs are viewed as rectangles
26 to be packed together. At present, edges are ignored during packing.
27 Packing is done using the standard packing functions. In particular,
28 the graph attributes \fBpack\fP and \fBpackmode\fP control the layout.
29 Each graph and cluster can specify its own values for these attributes.
30 Remember also that a cluster inherits its attribute values from
31 its parent graph.
32 .P
33 After all nodes and clusters, edges are routed based on the value of
34 the \fBsplines\fP attribute.
35 .SH OUTPUT FORMATS
36 Osage uses an extensible plugin mechanism for its output renderers,
37 so to see what output formats your installation of osage supports
38 you can use ``osage \-Txxx'' (where xxx is an unlikely format)
39 and check the warning message.
40 Also, The plugin mechanism supports multiple implementations
41 of the output formats.
42 To see what variants are available, use, for example: ``osage \-Tpng:''
43 and to force a particular variant, use, for example: ``osage \-Tpng:gd''
44 .P
45 Traditionally, osage supports the following:
46 \fB\-Tps\fP (PostScript),
47 \fB\-Tsvg\fP \fB\-Tsvgz\fP (Structured Vector Graphics),
48 \fB\-Tfig\fP (XFIG graphics),
49 \fB\-Tmif\fP (FrameMaker graphics),
50 \fB\-Thpgl\fP (HP pen plotters), and \fB\-Tpcl\fP (Laserjet printers),
51 \fB\-Tpng\fP \fB\-Tgif\fP (bitmap graphics),
52 \fB\-Timap\fP (imagemap files for httpd servers for each node or edge
53 that has a non\(hynull "href" attribute.),
54 \fB\-Tcmapx\fP (client\(hyside imagemap for use in html and xhtml).
55 Additional less common or more special\(hypurpose output formats
56 can be found at https://www.graphviz.org/doc/info/output.html.)
57 .P
58 Alternative plugins providing support for a given output format
59 can be found from the error message resulting from appending a ':' to the format. e.g. \fB\-Tpng:\fP
60 The first plugin listed is always the default.
61 .SH GRAPH FILE LANGUAGE
62 Here is a synopsis of the graph file language, normally using the extension \fB.gv\fR, for graphs:
63 .PP
64 [\fBstrict\fR] (\fBgraph\fR|\fBdigraph\fR) \fIname\fP { \fIstatement\(hylist\fP }\fR
65 .br
66 Is the top level graph. If the graph is \fBstrict\fR then multiple edges are
67 not allowed between the same pairs of nodes.
68 If it is a directed graph, indicated by \fBdigraph\fR,
69 then the \fIedgeop\fR must be "\->". If it is an undirected \fBgraph\fR
70 then the \fIedgeop\fR must be "\-\-".
71 Statements may be:
72 .PP
73 \fIname\fB=\fIval\fB;\fR
74 .br
75 \fBnode [\fIname\fB=\fIval\fB];\fR
76 .br
77 \fBedge [\fIname\fB=\fIval\fB];\fR
78 .br
79 Set default graph, node, or edge attribute \fIname\fP to \fIval\fP.
80 Any subgraph, node, or edge appearing after this inherits the new
81 default attributes.
82 .PP
83 \fBn0 [\fIname0=val0,name1=val1,...\fB];\fR
84 Creates node \fBn0\fP (if it does not already exist)
85 and sets its attributes according to the optional list.
86 .PP
87 \fBn0 \fIedgeop\fR n1 \fIedgeop\fR \fI...\fB \fIedgeop\fR nn [\fIname0=val0,name1=val1,...\fB];\fR
88 .br
89 Creates edges between nodes \fBn0\fP, \fBn1\fP, ..., \fBnn\fP and sets
90 their attributes according to the optional list.
91 Creates nodes as necessary.
92 .PP
93 [\fBsubgraph \fIname\fB] { \fIstatement\(hylist \fB}\fR
94 .br
95 Creates a subgraph. Subgraphs may be used in place
96 of \fBn0\fP, ..., \fBnn\fP in the above statements to create edges.
97 [\fBsubgraph \fIname\fR] is optional;
98 if missing, the subgraph is assigned an internal name.
99 .PP
100 Comments may be /*C\(hylike*/ or //C++\(hylike.
101
102 .PP
103 Attribute names and values are ordinary (C\(hystyle) strings.
104 The following sections describe attributes that control graph layout.
105
106 .SH "GRAPH ATTRIBUTES"
107 .PP
108 \fBsize="\fIx,y\fP"\fR sets bounding box of drawing in inches.
109 .PP
110 \fBpage="\fIx,y\fP"\fR sets the PostScript pagination unit.
111 .PP
112 \fBratio=\fIf\fR sets the aspect ratio to \fIf\fP which may be
113 a floating point number, or one of the keywords \fBfill\fP,
114 \fBcompress\fP, or \fBauto\fP.
115 .PP
116 \fBpagedir=\fR[TBLR][TBLR] sets the major and minor order of pagination.
117 .PP
118 \fBrotate=90\fR sets landscape mode.
119 (\fBorientation=land\fR is backward compatible but obsolete.)
120 .PP
121 \fBcenter=\fIn\fR a non\(hyzero value centers the drawing on the page.
122 .PP
123 \fBlayers="\fIid:id:id:id\fR" is a sequence of layer identifiers for
124 overlay diagrams. The PostScript array variable \fIlayercolorseq\fR
125 sets the assignment of colors to layers. The least index is 1 and
126 each element must be a 3\(hyelement array to be interpreted as a color coordinate.
127 .PP
128 \fBcolor=\fIcolorvalue\fR sets foreground color (\fBbgcolor\fP for background).
129 .PP
130 \fBhref=\fI"url"\fR the default url for image map files; in PostScript files,
131 the base URL for all relative URLs, as recognized by Acrobat Distiller
132 3.0 and up.
133 .PP
134 \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
135 .PP
136 \fBstylesheet=\fI"file.css"\fR includes a reference to a stylesheet
137 in \-Tsvg and \-Tsvgz outputs. Ignored by other formats.
138 .PP
139 \fBsplines\fR. If set to \fItrue\fR, edges are
140 drawn as splines.
141 If set to \fIpolyline\fR, edges are
142 drawn as polylines.
143 If set to \fIortho\fR, edges are
144 drawn as orthogonal polylines.
145 In all of these cases, the nodes may not overlap.
146 If \fBsplines=\fIfalse\fR or \fBsplines=\fIline\fR, edges are
147 drawn as line segments.
148 The default is \fIfalse\fR.
149
150 .SH "NODE ATTRIBUTES"
151 .PP
152 \fBheight=\fId\fR or \fBwidth=\fId\fR sets minimum height or width.
153 Adding \fBfixedsize=true\fP forces these to be the actual size
154 (text labels are ignored).
155 .PP
156 \fBshape=record polygon epsf \fIbuiltin_polygon\fR
157 .br
158 \fIbuiltin_polygon\fR is one of: \fBplaintext ellipse oval circle egg
159 triangle box diamond trapezium parallelogram house hexagon octagon
160 note tab box3d component.\fR
161 (Polygons are defined or modified by the following node attributes:
162 \fBregular\fR, \fBperipheries\fR, \fBsides\fR, \fBorientation\fR,
163 \fBdistortion\fR and \fBskew\fR.) \fBepsf\fR uses the node's
164 \fBshapefile\fR attribute as the path name of an external
165 EPSF file to be automatically loaded for the node shape.
166 .PP
167 \fBlabel=\fItext\fR where \fItext\fP may include escaped newlines
168 \\\|n, \\\|l, or \\\|r for center, left, and right justified lines.
169 The string '\\N' value will be replaced by the node name.
170 The string '\\G' value will be replaced by the graph name.
171 Record labels may contain recursive box lists delimited by { | }.
172 Port identifiers in labels are set off by angle brackets < >.
173 In the graph file, use colon (such as, \fBnode0:port28\fR).
174 .PP
175 \fBfontsize=\fIn\fR sets the label type size to \fIn\fP points.
176 .PP
177 \fBfontname=\fIname\fR sets the label font family name.
178 .PP
179 \fBcolor=\fIcolorvalue\fR sets the outline color, and the default fill color
180 if style=filled and \fBfillcolor\fR is not specified.
181 .PP
182 \fBfillcolor=\fIcolorvalue\fR sets the fill color
183 when style=filled. If not specified, the fillcolor when style=filled defaults
184 to be the same as the outline color.
185 .PP
186 \fBfontcolor=\fIcolorvalue\fR sets the label text color.
187 .PP
188 A \fIcolorvalue\fP may be "\fIh,s,v\fB"\fR (hue, saturation, brightness)
189 floating point numbers between 0 and 1, or an X11 color name such as
190 \fBwhite black red green blue yellow magenta cyan\fR or \fBburlywood\fR,
191 or a "\fI#rrggbb" (red, green, blue, 2 hex characters each) value.
192 .PP
193 \fBstyle=filled solid dashed dotted bold invis\fP or any Postscript code.
194 .PP
195 \fBlayer=\fIid\fR or \fIid:id\fR or "all" sets the node's active layers.
196 The empty string means no layers (invisible).
197 .PP
198 The following attributes apply only to polygon shape nodes:
199 .PP
200 \fBregular=\fIn\fR if \fIn\fR is non\(hyzero then the polygon is made
201 regular, i.e. symmetric about the x and y axis, otherwise the
202 polygon takes on the aspect ratio of the label.
203 \fIbuiltin_polygons\fR that are not already regular are made regular
204 by this attribute.
205 \fIbuiltin_polygons\fR that are already regular are not affected (i.e.
206 they cannot be made asymmetric).
207 .PP
208 \fBperipheries=\fIn\fR sets the number of periphery lines drawn around
209 the polygon. This value supersedes the number of periphery lines
210 of \fIbuiltin_polygons\fR.
211 .PP
212 \fBsides=\fIn\fR sets the number of sides to the polygon. \fIn\fR<3
213 results in an ellipse.
214 This attribute is ignored by \fIbuiltin_polygons\fR.
215 .PP
216 \fBorientation=\fIf\fR sets the orientation of the first apex of the
217 polygon counterclockwise from the vertical, in degrees.
218 \fIf\fR may be a floating point number.
219 The orientation of labels is not affected by this attribute.
220 This attribute is added to the initial orientation of \fIbuiltin_polygons.\fR
221 .PP
222 \fBdistortion=\fIf\fR sets the amount of broadening of the top and
223 narrowing of the bottom of the polygon (relative to its orientation).
224 Floating point values between \-1 and +1 are suggested.
225 This attribute is ignored by \fIbuiltin_polygons\fR.
226 .PP
227 \fBskew=\fIf\fR sets the amount of right\(hydisplacement of the top and
228 left\(hydisplacement of the bottom of the polygon (relative to its
229 orientation).
230 Floating point values between \-1 and +1 are suggested.
231 This attribute is ignored by \fIbuiltin_polygons\fR.
232 .PP
233 \fBhref=\fI"url"\fR sets the url for the node in imagemap, PostScript and SVG
234 files.
235 The substrings '\\N' and '\\G' are substituted in the same manner as
236 for the node label attribute.
237 Additionally the substring '\\L' is substituted with the node label string.
238 .PP
239 \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
240 .PP
241 \fBtarget=\fI"target"\fR is a target string for client\(hyside imagemaps
242 and SVG, effective when nodes have a URL.
243 The target string is used to determine which window of the browser is used
244 for the URL. Setting it to "_graphviz" will open a new window if it doesn't
245 already exist, or reuse it if it does.
246 If the target string is empty, the default,
247 then no target attribute is included in the output.
248 The substrings '\\N' and '\\G' are substituted in the same manner as
249 for the node label attribute.
250 Additionally the substring '\\L' is substituted with the node label string.
251 .PP
252 \fBtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
253 and SVG, effective when nodes have a URL. The tooltip string defaults to be the
254 same as the label string, but this attribute permits nodes without
255 labels to still have tooltips thus permitting denser graphs.
256 The substrings '\\N' and '\\G' are substituted in the same manner as
257 for the node label attribute.
258 Additionally the substring '\\L' is substituted with the node label string.
259
260
261 .SH "EDGE ATTRIBUTES"
262 .PP
263 \fBlabel=\fItext\fR where \fItext\fR may include escaped newlines
264 \\\|n, \\\|l, or \\\|r for centered, left, or right justified lines.
265 If the substring '\\T' is found in a label it will be replaced by the tail_node name.
266 If the substring '\\H' is found in a label it will be replaced by the head_node name.
267 If the substring '\\E' value is found in a label it will be replaced by: tail_node_name\->head_node_name
268 If the substring '\\G' is found in a label it will be replaced by the graph name.
269 or by: tail_node_name\-\-head_node_name for undirected graphs.
270 .PP
271 \fBfontsize=\fIn\fR sets the label type size to \fIn\fP points.
272 .PP
273 \fBfontname=\fIname\fR sets the label font family name.
274 .PP
275 \fBfontcolor=\fIcolorvalue\fR sets the label text color.
276 .PP
277 \fBstyle=solid dashed dotted bold invis\fP
278 .PP
279 \fBcolor=\fIcolorvalue\fR sets the line color for edges.
280 .PP
281 \fBcolor=\fIcolorvaluelist\fR a ':' separated list of \fIcolorvalue\fR creates
282 parallel edges, one edge for each color.
283 .PP
284 \fBdir=forward back both none\fP controls arrow direction.
285 .PP
286 \fBtailclip,headclip=false\fP disables endpoint shape clipping.
287 .PP
288 \fBhref=\fI"url"\fR sets the url for the node in imagemap, PostScript and SVG
289 files.
290 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
291 for the edge label attribute.
292 Additionally the substring '\\L' is substituted with the edge label string.
293 .PP
294 \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
295 .PP
296 \fBtarget=\fI"target"\fR is a target string for client\(hyside imagemaps
297 and SVG, effective when edges have a URL.
298 If the target string is empty, the default,
299 then no target attribute is included in the output.
300 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
301 for the edge label attribute.
302 Additionally the substring '\\L' is substituted with the edge label string.
303 .PP
304 \fBtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
305 effective when edges have a URL. The tooltip string defaults to be the
306 same as the edge label string.
307 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
308 for the edge label attribute.
309 Additionally the substring '\\L' is substituted with the edge label string.
310 .PP
311 \fBarrowhead,arrowtail=none, normal, inv, dot, odot, invdot, invodot,
312 tee, empty, invempty, open, halfopen, diamond, odiamond, box, obox, crow\fP.
313 .PP
314 \fBarrowsize\fP (norm_length=10,norm_width=5,
315 inv_length=6,inv_width=7,dot_radius=2)
316 .PP
317 \fBheadlabel,taillabel=string\fP for port labels.
318 \fBlabelfontcolor\fP,\fBlabelfontname\fP,\fBlabelfontsize\fP
319 for head and tail labels.
320 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
321 for the edge label attribute.
322 Additionally the substring '\\L' is substituted with the edge label string.
323 .PP
324 \fBheadhref=\fI"url"\fR sets the url for the head port in imagemap, PostScript and SVG files.
325 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
326 for the edge label attribute.
327 Additionally the substring '\\L' is substituted with the edge label string.
328 .PP
329 \fBheadURL=\fI"url"\fR ("headURL" is a synonym for "headhref".)
330 .PP
331 \fBheadtarget=\fI"headtarget"\fR is a target string for client\(hyside imagemaps
332 and SVG, effective when edge heads have a URL.
333 The headtarget string is used to determine which window of the browser is used
334 for the URL. If the headtarget string is empty, the default,
335 then headtarget defaults to the same value as target for the edge.
336 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
337 for the edge label attribute.
338 Additionally the substring '\\L' is substituted with the edge label string.
339 .PP
340 \fBheadtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
341 effective when head ports have a URL. The tooltip string defaults to be the
342 same as the headlabel string.
343 The substrings '\\T', '\\H', and '\\E' are substituted in the same manner as
344 for the edge label attribute.
345 Additionally the substring '\\L' is substituted with the edge label string.
346 .PP
347 \fBtailhref=\fI"url"\fR sets the url for the tail port in imagemap, PostScript and SVG files.
348 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
349 for the edge label attribute.
350 Additionally the substring '\\L' is substituted with the edge label string.
351 .PP
352 \fBtailURL=\fI"url"\fR ("tailURL" is a synonym for "tailhref".)
353 .PP
354 \fBtailtarget=\fI"tailtarget"\fR is a target string for client\(hyside imagemaps
355 and SVG, effective when edge tails have a URL.
356 The tailtarget string is used to determine which window of the browser is used
357 for the URL. If the tailtarget string is empty, the default,
358 then tailtarget defaults to the same value as target for the edge.
359 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
360 for the edge label attribute.
361 Additionally the substring '\\L' is substituted with the edge label string.
362 .PP
363 \fBtailtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
364 effective when tail ports have a URL. The tooltip string defaults to be the
365 same as the taillabel string.
366 The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
367 for the edge label attribute.
368 Additionally the substring '\\L' is substituted with the edge label string.
369 .PP
370 \fBlabeldistance\fP and \fPport_label_distance\fP set distance; also
371 \fBlabelangle\fP (in degrees CCW)
372 .PP
373 \fBdecorate\fP draws line from edge to label.
374 .PP
375 \fBsamehead,sametail\fP aim edges having the same value to the
376 same port, using the average landing point.
377 .PP
378 \fBlayer=\fIid\fR or \fIid:id\fR or "all" sets the edge's active layers.
379 The empty string means no layers (invisible).
380
381 .PP
382 \fB(neato\(hyspecific attributes)\fR
383 .br
384 \fBw=\fIf\fR sets the weight (spring constant) of an edge
385 to the given floating point value. The default is 1.0;
386 greater values make the edge tend more toward its optimal length.
387 .PP
388 \fBlen=\fIf\fR sets the optimal length of an edge.
389 The default is 1.0.
390 .SH "COMMAND LINE OPTIONS"
391 \fB\-G\fP sets a default graph attribute.
392 .br
393 \fB\-N\fP sets a default node attribute.
394 .br
395 \fB\-E\fP sets a default edge attribute.
396 Example: \fB\-Gsize="7,8" \-Nshape=box \-Efontsize=8\fR
397 .PP
398 \fB\-l\fIfile\fR loads custom PostScript library files.
399 Usually these define custom shapes or styles.
400 If \fB\-l\fP is given by itself, the standard library is omitted.
401 .PP
402 \fB\-T\fIlang\fR sets the output language as described above.
403 .PP
404 \fB\-O\fP automatically generate output filenames based on the input filename and the \-T format.
405 .PP
406 \fB\-o\fIfile\fR write output to \fIfile\fP.
407 .PP
408 \fB\-x\fP reduce graph.
409 .PP
410 \fB\-Lg\fP don't use grid.
411 .PP
412 \fB\-LO\fP use old attractive force.
413 .PP
414 \fB\-Ln\fIi\fR set number of iterations to \fIi\fP.
415 .PP
416 \fB\-LU\fIi\fR set unscaled factor to \fIi\fP.
417 .PP
418 \fB\-LC\fIv\fR set overlap expansion factor to \fIv\fP.
419 .PP
420 \fB\-LT\fR[*]\fIv\fR set temperature (temperature factor) to \fIv\fP.
421 .PP
422 \fB\-v\fP (verbose) prints various information useful for debugging.
423 .PP
424 \fB\-V\fP (version) prints version information and exits.
425 .PP
426 \fB\-?\fP prints the usage and exits.
427 .SH "EXAMPLES"
428 .nf
429 digraph test123 {
430 pack=8
431 subgraph cluster0 {
432 packmode=array
433 x y x0 y0 x1
434 subgraph cluster1 {
435 m n
436 }
437 }
438 b [shape=box];
439 c [label="hello\enworld",color=blue,fontsize=24,
440 fontname="Palatino\-Italic",fontcolor=red,style=filled];
441 a \-> z
442 x \-> z
443 a \-> b \-> c;
444 a \-> {x y};
445 edge [style=dashed,color=red];
446 b \-> x;
447 }
448 .fi
449 .SH AUTHORS
450 Emden R. Gansner <[email protected]>
451 .SH "SEE ALSO"
452 This man page contains only a small amount of the information related
453 to the Graphviz layout programs. The most complete information can be
454 found at https://www.graphviz.org/documentation/, especially in the
455 on\(hyline reference pages. Most of these documents are also available in the
456 \fIdoc\fP and \fIdoc/info\fP subtrees in the source and binary distributions.
457 .PP
458 dot(1)