Debian Codegraph @

cmd/dot/patchwork.1

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