osage.1 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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. .PP
  102. Attribute names and values are ordinary (C\(hystyle) strings.
  103. The following sections describe attributes that control graph layout.
  104. .SH "GRAPH ATTRIBUTES"
  105. .PP
  106. \fBsize="\fIx,y\fP"\fR sets bounding box of drawing in inches.
  107. .PP
  108. \fBpage="\fIx,y\fP"\fR sets the PostScript pagination unit.
  109. .PP
  110. \fBratio=\fIf\fR sets the aspect ratio to \fIf\fP which may be
  111. a floating point number, or one of the keywords \fBfill\fP,
  112. \fBcompress\fP, or \fBauto\fP.
  113. .PP
  114. \fBpagedir=\fR[TBLR][TBLR] sets the major and minor order of pagination.
  115. .PP
  116. \fBrotate=90\fR sets landscape mode.
  117. (\fBorientation=land\fR is backward compatible but obsolete.)
  118. .PP
  119. \fBcenter=\fIn\fR a non\(hyzero value centers the drawing on the page.
  120. .PP
  121. \fBlayers="\fIid:id:id:id\fR" is a sequence of layer identifiers for
  122. overlay diagrams. The PostScript array variable \fIlayercolorseq\fR
  123. sets the assignment of colors to layers. The least index is 1 and
  124. each element must be a 3\(hyelement array to be interpreted as a color coordinate.
  125. .PP
  126. \fBcolor=\fIcolorvalue\fR sets foreground color (\fBbgcolor\fP for background).
  127. .PP
  128. \fBhref=\fI"url"\fR the default url for image map files; in PostScript files,
  129. the base URL for all relative URLs, as recognized by Acrobat Distiller
  130. 3.0 and up.
  131. .PP
  132. \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
  133. .PP
  134. \fBstylesheet=\fI"file.css"\fR includes a reference to a stylesheet
  135. in \-Tsvg and \-Tsvgz outputs. Ignored by other formats.
  136. .PP
  137. \fBsplines\fR. If set to \fItrue\fR, edges are
  138. drawn as splines.
  139. If set to \fIpolyline\fR, edges are
  140. drawn as polylines.
  141. If set to \fIortho\fR, edges are
  142. drawn as orthogonal polylines.
  143. In all of these cases, the nodes may not overlap.
  144. If \fBsplines=\fIfalse\fR or \fBsplines=\fIline\fR, edges are
  145. drawn as line segments.
  146. The default is \fIfalse\fR.
  147. .SH "NODE ATTRIBUTES"
  148. .PP
  149. \fBheight=\fId\fR or \fBwidth=\fId\fR sets minimum height or width.
  150. Adding \fBfixedsize=true\fP forces these to be the actual size
  151. (text labels are ignored).
  152. .PP
  153. \fBshape=record polygon epsf \fIbuiltin_polygon\fR
  154. .br
  155. \fIbuiltin_polygon\fR is one of: \fBplaintext ellipse oval circle egg
  156. triangle box diamond trapezium parallelogram house hexagon octagon
  157. note tab box3d component.\fR
  158. (Polygons are defined or modified by the following node attributes:
  159. \fBregular\fR, \fBperipheries\fR, \fBsides\fR, \fBorientation\fR,
  160. \fBdistortion\fR and \fBskew\fR.) \fBepsf\fR uses the node's
  161. \fBshapefile\fR attribute as the path name of an external
  162. EPSF file to be automatically loaded for the node shape.
  163. .PP
  164. \fBlabel=\fItext\fR where \fItext\fP may include escaped newlines
  165. \\\|n, \\\|l, or \\\|r for center, left, and right justified lines.
  166. The string '\\N' value will be replaced by the node name.
  167. The string '\\G' value will be replaced by the graph name.
  168. Record labels may contain recursive box lists delimited by { | }.
  169. Port identifiers in labels are set off by angle brackets < >.
  170. In the graph file, use colon (such as, \fBnode0:port28\fR).
  171. .PP
  172. \fBfontsize=\fIn\fR sets the label type size to \fIn\fP points.
  173. .PP
  174. \fBfontname=\fIname\fR sets the label font family name.
  175. .PP
  176. \fBcolor=\fIcolorvalue\fR sets the outline color, and the default fill color
  177. if style=filled and \fBfillcolor\fR is not specified.
  178. .PP
  179. \fBfillcolor=\fIcolorvalue\fR sets the fill color
  180. when style=filled. If not specified, the fillcolor when style=filled defaults
  181. to be the same as the outline color.
  182. .PP
  183. \fBfontcolor=\fIcolorvalue\fR sets the label text color.
  184. .PP
  185. A \fIcolorvalue\fP may be "\fIh,s,v\fB"\fR (hue, saturation, brightness)
  186. floating point numbers between 0 and 1, or an X11 color name such as
  187. \fBwhite black red green blue yellow magenta cyan\fR or \fBburlywood\fR,
  188. or a "\fI#rrggbb" (red, green, blue, 2 hex characters each) value.
  189. .PP
  190. \fBstyle=filled solid dashed dotted bold invis\fP or any Postscript code.
  191. .PP
  192. \fBlayer=\fIid\fR or \fIid:id\fR or "all" sets the node's active layers.
  193. The empty string means no layers (invisible).
  194. .PP
  195. The following attributes apply only to polygon shape nodes:
  196. .PP
  197. \fBregular=\fIn\fR if \fIn\fR is non\(hyzero then the polygon is made
  198. regular, i.e. symmetric about the x and y axis, otherwise the
  199. polygon takes on the aspect ratio of the label.
  200. \fIbuiltin_polygons\fR that are not already regular are made regular
  201. by this attribute.
  202. \fIbuiltin_polygons\fR that are already regular are not affected (i.e.
  203. they cannot be made asymmetric).
  204. .PP
  205. \fBperipheries=\fIn\fR sets the number of periphery lines drawn around
  206. the polygon. This value supersedes the number of periphery lines
  207. of \fIbuiltin_polygons\fR.
  208. .PP
  209. \fBsides=\fIn\fR sets the number of sides to the polygon. \fIn\fR<3
  210. results in an ellipse.
  211. This attribute is ignored by \fIbuiltin_polygons\fR.
  212. .PP
  213. \fBorientation=\fIf\fR sets the orientation of the first apex of the
  214. polygon counterclockwise from the vertical, in degrees.
  215. \fIf\fR may be a floating point number.
  216. The orientation of labels is not affected by this attribute.
  217. This attribute is added to the initial orientation of \fIbuiltin_polygons.\fR
  218. .PP
  219. \fBdistortion=\fIf\fR sets the amount of broadening of the top and
  220. narrowing of the bottom of the polygon (relative to its orientation).
  221. Floating point values between \-1 and +1 are suggested.
  222. This attribute is ignored by \fIbuiltin_polygons\fR.
  223. .PP
  224. \fBskew=\fIf\fR sets the amount of right\(hydisplacement of the top and
  225. left\(hydisplacement of the bottom of the polygon (relative to its
  226. orientation).
  227. Floating point values between \-1 and +1 are suggested.
  228. This attribute is ignored by \fIbuiltin_polygons\fR.
  229. .PP
  230. \fBhref=\fI"url"\fR sets the url for the node in imagemap, PostScript and SVG
  231. files.
  232. The substrings '\\N' and '\\G' are substituted in the same manner as
  233. for the node label attribute.
  234. Additionally the substring '\\L' is substituted with the node label string.
  235. .PP
  236. \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
  237. .PP
  238. \fBtarget=\fI"target"\fR is a target string for client\(hyside imagemaps
  239. and SVG, effective when nodes have a URL.
  240. The target string is used to determine which window of the browser is used
  241. for the URL. Setting it to "_graphviz" will open a new window if it doesn't
  242. already exist, or reuse it if it does.
  243. If the target string is empty, the default,
  244. then no target attribute is included in the output.
  245. The substrings '\\N' and '\\G' are substituted in the same manner as
  246. for the node label attribute.
  247. Additionally the substring '\\L' is substituted with the node label string.
  248. .PP
  249. \fBtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
  250. and SVG, effective when nodes have a URL. The tooltip string defaults to be the
  251. same as the label string, but this attribute permits nodes without
  252. labels to still have tooltips thus permitting denser graphs.
  253. The substrings '\\N' and '\\G' are substituted in the same manner as
  254. for the node label attribute.
  255. Additionally the substring '\\L' is substituted with the node label string.
  256. .SH "EDGE ATTRIBUTES"
  257. .PP
  258. \fBlabel=\fItext\fR where \fItext\fR may include escaped newlines
  259. \\\|n, \\\|l, or \\\|r for centered, left, or right justified lines.
  260. If the substring '\\T' is found in a label it will be replaced by the tail_node name.
  261. If the substring '\\H' is found in a label it will be replaced by the head_node name.
  262. If the substring '\\E' value is found in a label it will be replaced by: tail_node_name\->head_node_name
  263. If the substring '\\G' is found in a label it will be replaced by the graph name.
  264. or by: tail_node_name\-\-head_node_name for undirected graphs.
  265. .PP
  266. \fBfontsize=\fIn\fR sets the label type size to \fIn\fP points.
  267. .PP
  268. \fBfontname=\fIname\fR sets the label font family name.
  269. .PP
  270. \fBfontcolor=\fIcolorvalue\fR sets the label text color.
  271. .PP
  272. \fBstyle=solid dashed dotted bold invis\fP
  273. .PP
  274. \fBcolor=\fIcolorvalue\fR sets the line color for edges.
  275. .PP
  276. \fBcolor=\fIcolorvaluelist\fR a ':' separated list of \fIcolorvalue\fR creates
  277. parallel edges, one edge for each color.
  278. .PP
  279. \fBdir=forward back both none\fP controls arrow direction.
  280. .PP
  281. \fBtailclip,headclip=false\fP disables endpoint shape clipping.
  282. .PP
  283. \fBhref=\fI"url"\fR sets the url for the node in imagemap, PostScript and SVG
  284. files.
  285. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  286. for the edge label attribute.
  287. Additionally the substring '\\L' is substituted with the edge label string.
  288. .PP
  289. \fBURL=\fI"url"\fR ("URL" is a synonym for "href".)
  290. .PP
  291. \fBtarget=\fI"target"\fR is a target string for client\(hyside imagemaps
  292. and SVG, effective when edges have a URL.
  293. If the target string is empty, the default,
  294. then no target attribute is included in the output.
  295. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  296. for the edge label attribute.
  297. Additionally the substring '\\L' is substituted with the edge label string.
  298. .PP
  299. \fBtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
  300. effective when edges have a URL. The tooltip string defaults to be the
  301. same as the edge label string.
  302. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  303. for the edge label attribute.
  304. Additionally the substring '\\L' is substituted with the edge label string.
  305. .PP
  306. \fBarrowhead,arrowtail=none, normal, inv, dot, odot, invdot, invodot,
  307. tee, empty, invempty, open, halfopen, diamond, odiamond, box, obox, crow\fP.
  308. .PP
  309. \fBarrowsize\fP (norm_length=10,norm_width=5,
  310. inv_length=6,inv_width=7,dot_radius=2)
  311. .PP
  312. \fBheadlabel,taillabel=string\fP for port labels.
  313. \fBlabelfontcolor\fP,\fBlabelfontname\fP,\fBlabelfontsize\fP
  314. for head and tail labels.
  315. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  316. for the edge label attribute.
  317. Additionally the substring '\\L' is substituted with the edge label string.
  318. .PP
  319. \fBheadhref=\fI"url"\fR sets the url for the head port in imagemap, PostScript and SVG files.
  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. \fBheadURL=\fI"url"\fR ("headURL" is a synonym for "headhref".)
  325. .PP
  326. \fBheadtarget=\fI"headtarget"\fR is a target string for client\(hyside imagemaps
  327. and SVG, effective when edge heads have a URL.
  328. The headtarget string is used to determine which window of the browser is used
  329. for the URL. If the headtarget string is empty, the default,
  330. then headtarget defaults to the same value as target for the edge.
  331. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  332. for the edge label attribute.
  333. Additionally the substring '\\L' is substituted with the edge label string.
  334. .PP
  335. \fBheadtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
  336. effective when head ports have a URL. The tooltip string defaults to be the
  337. same as the headlabel string.
  338. The substrings '\\T', '\\H', and '\\E' are substituted in the same manner as
  339. for the edge label attribute.
  340. Additionally the substring '\\L' is substituted with the edge label string.
  341. .PP
  342. \fBtailhref=\fI"url"\fR sets the url for the tail port in imagemap, PostScript and SVG files.
  343. The substrings '\\T', '\\H', '\\E' and '\\G' 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. \fBtailURL=\fI"url"\fR ("tailURL" is a synonym for "tailhref".)
  348. .PP
  349. \fBtailtarget=\fI"tailtarget"\fR is a target string for client\(hyside imagemaps
  350. and SVG, effective when edge tails have a URL.
  351. The tailtarget string is used to determine which window of the browser is used
  352. for the URL. If the tailtarget string is empty, the default,
  353. then tailtarget defaults to the same value as target for the edge.
  354. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  355. for the edge label attribute.
  356. Additionally the substring '\\L' is substituted with the edge label string.
  357. .PP
  358. \fBtailtooltip=\fI"tooltip"\fR is a tooltip string for client\(hyside imagemaps
  359. effective when tail ports have a URL. The tooltip string defaults to be the
  360. same as the taillabel string.
  361. The substrings '\\T', '\\H', '\\E' and '\\G' are substituted in the same manner as
  362. for the edge label attribute.
  363. Additionally the substring '\\L' is substituted with the edge label string.
  364. .PP
  365. \fBlabeldistance\fP and \fPport_label_distance\fP set distance; also
  366. \fBlabelangle\fP (in degrees CCW)
  367. .PP
  368. \fBdecorate\fP draws line from edge to label.
  369. .PP
  370. \fBsamehead,sametail\fP aim edges having the same value to the
  371. same port, using the average landing point.
  372. .PP
  373. \fBlayer=\fIid\fR or \fIid:id\fR or "all" sets the edge's active layers.
  374. The empty string means no layers (invisible).
  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. digraph test123 {
  424. pack=8
  425. subgraph cluster0 {
  426. packmode=array
  427. x y x0 y0 x1
  428. subgraph cluster1 {
  429. m n
  430. }
  431. }
  432. b [shape=box];
  433. c [label="hello\enworld",color=blue,fontsize=24,
  434. fontname="Palatino\-Italic",fontcolor=red,style=filled];
  435. a \-> z
  436. x \-> z
  437. a \-> b \-> c;
  438. a \-> {x y};
  439. edge [style=dashed,color=red];
  440. b \-> x;
  441. }
  442. .fi
  443. .SH AUTHORS
  444. Emden R. Gansner <[email protected]>
  445. .SH "SEE ALSO"
  446. This man page contains only a small amount of the information related
  447. to the Graphviz layout programs. The most complete information can be
  448. found at https://www.graphviz.org/documentation/, especially in the
  449. on\(hyline reference pages. Most of these documents are also available in the
  450. \fIdoc\fP and \fIdoc/info\fP subtrees in the source and binary distributions.
  451. .PP
  452. dot(1)