Dot.ref 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. Quick Reference Guide for GraphViz
  2. 20 February 2002
  3. Command-line Invocation
  4. ------------------------------------------------------------------------
  5. All GraphViz programs have a similar invocation:
  6. cmd [ flags ] [ input files ]
  7. If no input files are supplied, the program reads from stdin.
  8. Flags
  9. -Gname=value
  10. Set a graph attribute.
  11. -Nname=value
  12. Set a default node attribute.
  13. -Ename=value
  14. Set a default edge attribute.
  15. -Tformat
  16. Set output language to one of the supported formats. By default,
  17. attributed dot is produced.
  18. -V
  19. Emit version information and exit.
  20. -llibfile
  21. User-supplied, device-dependent library files. Multiple libraries may
  22. be given. These names are passed to the code generator at the beginning
  23. of output.
  24. -n[num]
  25. Sets no-op flag in neato. If set, neato assumes nodes have already been
  26. positioned and have a pos attribute giving this position. It then just
  27. computes the edge layouts and emits the graph in the appropriate
  28. format. If num is supplied and > 1, neato checks for previously
  29. positioned edges, with control points provided in the pos attribute. It
  30. uses these if given; otherwise, it computes the edge layout.
  31. -ooutfile
  32. Write output to file outfile. By default, output goes to stdout.
  33. -s[scale]
  34. Set input scale to scale. If this value is omitted, 72.0 is used. This
  35. number is used to convert the point coordinate units used in the pos
  36. attribute into inches. For example, dot -Tdot produces pos values in
  37. points, with 72 per inch. Thus, to use this output as input to neato
  38. -n, one needs -s (equivalently, -s72).
  39. -v
  40. Verbose mode
  41. -x
  42. In neato, on input, prune isolated nodes and peninsulas. This removes
  43. uninteresting graph structure and produces a less cluttered drawing.
  44. Note that the file contents override the -G, -N and -E flags. In addition,
  45. these flags cause the related attributes to be permanently attached to the
  46. graph. Thus, if attributed dot is used for output, the graph will have these
  47. attributes.
  48. ------------------------------------------------------------------------
  49. The DOT Language
  50. ------------------------------------------------------------------------
  51. digraph G {foo -> bar; ... } or graph G { foo -- bar; ...}
  52. To connect all pairs:
  53. {foo bar}->{baz bart}
  54. To make a chain of links:
  55. foo->bar->baz
  56. Commas inside [...] and semicolons inside {...} are optional.
  57. Quotes are needed on attribute values to protect spaces, commas, periods, etc.
  58. // C++ like comment: to end of line
  59. /* C-like comment: between delimiters */
  60. For a complete language description, see
  61. http://www.research.att.com/~erg/graphviz/info/lang.html
  62. ------------------------------------------------------------------------
  63. Attributes
  64. ------------------------------------------------------------------------
  65. Name Used By Type Default Minimum Notes
  66. Damping G double 0.99 0.0 neato only
  67. Epsilon G double (.0001 * # nodes) neato only
  68. URL ENGC string
  69. arrowhead E arrowType normal
  70. arrowsize E double 1.0 0.0
  71. arrowtail E arrowType normal
  72. bb G rect write-only
  73. bgcolor G color
  74. bottomlabel N string ""
  75. center G bool false
  76. clusterrank G clusterMode local dot only
  77. color ENC color black
  78. comment ENG string ""
  79. compound G bool false dot only
  80. concentrate G bool false dot only
  81. constraint E bool true dot only
  82. decorate E bool false
  83. dir E dirType forward(directed)
  84. none(undirected)
  85. distortion N double 0.0 -100.0
  86. fillcolor NC color lightgrey(nodes)
  87. black(clusters)
  88. fixedsize N bool false
  89. fontcolor ENGC color black
  90. fontname ENGC string "Times-Roman"
  91. fontpath G string ""
  92. fontsize ENGC double 14.0 1.0
  93. group N string "" dot only
  94. headURL E string ""
  95. headlabel E string ""
  96. headport E portPos center
  97. height N double 0.5 0.02
  98. K G double 1.0 0.0 sfdp only
  99. label ENGC string ""
  100. "\N" (nodes)
  101. labelangle E double -25.0 -180.0
  102. labeldistance E double 1.0 0.0
  103. labelfloat E bool false
  104. labelfontcolor E color black
  105. labelfontname E string "Times-Roman"
  106. labelfontsize E double 11.0 1.0
  107. labeljust C string "" dot only
  108. labelloc GC string "t"(clusters) dot only
  109. "b"(root graphs)
  110. layer EN layerRange ""
  111. layers G layerList ""
  112. len E double 1.0 neato only
  113. levels G int MAXINT 0 sfdp only
  114. lhead E string "" dot only
  115. lp EGC point write-only
  116. ltail E string "" dot only
  117. margin G double
  118. pointf
  119. maxiter G int MAXINT neato only
  120. mclimit G double 1.0 dot only
  121. minlen E int 1 0 dot only
  122. model G string "" neato only
  123. nodesep G double 0.25 0.02 dot only
  124. normalize G bool false neato only
  125. nslimit
  126. nslimit1 G double dot only
  127. ordering G string "" dot only
  128. orientation N double 0.0 360.0
  129. orientation G string ""
  130. overlap G string "" neato/sfdp only
  131. bool
  132. page G pointf
  133. pagedir G pagedir BL
  134. peripheries N int 0
  135. pin N bool neato only
  136. pos EN point
  137. splineType
  138. quadtree G string "" sfdp only
  139. quantum G double 0.0 0.0
  140. rank S rankType dot only
  141. rankdir G rankdir TB dot only
  142. ranksep G double 0.5 0.02
  143. ratio G double
  144. rects N rect write-only
  145. regular N bool false
  146. remincross G bool false dot only
  147. repulsiveforce G double 1 0.0 sfdp only
  148. rotate G int 0
  149. samehead E string "" dot only
  150. sametail E string "" dot only
  151. samplepoints G int 8
  152. searchsize G int 30 dot only
  153. sep G double 0.01 neato only
  154. shape N shape ellipse
  155. shapefile N string ""
  156. showboxes ENG int 0 0 dot only
  157. sides N int 4 0
  158. size G pointf
  159. skew N double 0.0 -100.0
  160. smoothing G string "" sfdp only
  161. splines G bool false neato only
  162. start G string "" neato only
  163. int
  164. style ENC style
  165. styleheet G style
  166. tailURL E string ""
  167. taillabel E string ""
  168. tailport E portPos center
  169. toplabel N string ""
  170. vertices N pointfList write-only
  171. voro_margin G double 0.05 0.0 neato only
  172. w E double 1.0 neato only
  173. weight E double 1.0 0(dot)
  174. 1(neato)
  175. width N double 0.75 0.01
  176. z N double 0.0 -MAXFLOAT
  177. -1000
  178. ------------------------------------------------------
  179. For the bool type, TRUE values are represented by "true" (case-insensitive)
  180. and any non-zero integer, and FALSE values by "false" (case-insensitive) and
  181. zero.
  182. In the Used By field, the characters E, N, G and C represent edges, nodes,
  183. the root graph and cluster subgraphs, respectively. This field indicates
  184. which graph component uses the attribute.
  185. ------------------------------------------------------------------------
  186. Attribute Descriptions
  187. Damping
  188. Factor damping force motions. On each iteration, a nodes movement is
  189. limited to this factor of its potential motion. By being less than 1.0,
  190. the system tends to ``cool'', thereby preventing cycling.
  191. Epsilon
  192. Terminating condition. If the length squared of all energy gradients
  193. are < Epsilon, the algorithm stops.
  194. URL
  195. Incorporated into device-dependent output. At present, used for ps2,
  196. i*map and svg. For ps2, URLs can be attached to nodes and the root
  197. graph. When distilled to PDF, such nodes are active links and the graph
  198. URL can be used as a base URL. For i*map, URLs can be attached to
  199. nodes, edges and the root graph. If the node or edge URL contains "\N",
  200. this is replaced by the object's name. For svg, URLs can be attached to
  201. nodes, edges and clusters, with "\N" replacement done for all three.
  202. arrowhead
  203. Style of arrowhead on head of edge.
  204. arrowsize
  205. Multiplicative scale factor for arrowheads.
  206. arrowtail
  207. Style of arrowhead on tail of edge.
  208. bb
  209. Bounding box of drawing in integer points.
  210. bgcolor
  211. Color used as background for canvas, plus initial fill color.
  212. bottomlabel
  213. Additional label near bottom of nodes of shape M*.
  214. center
  215. If true, the drawing is centered in the output canvas.
  216. clusterrank
  217. Mode used for handling clusters. If clusterrank is "local", a subgraph
  218. whose name begins with "cluster" is given special treatment. The
  219. subgraph is laid out separately, and then integrated as a unit into its
  220. parent graph, with a bounding rectangle drawn about it. If the cluster
  221. has a label parameter, this label is displayed within the rectangle.
  222. Note also that there can be clusters within clusters. At present, the
  223. modes "global" and "none" appear to be identical, both turning off the
  224. special cluster processing.
  225. color
  226. Basic drawing color for graphics.
  227. comment
  228. Comments are inserted into output. Device-dependent
  229. compound
  230. If true, allow edges between clusters. (See lhead and ltail below.)
  231. concentrate
  232. If true, use edge concentrators.
  233. constraint
  234. If false, the edge is not used in ranking the nodes. For example, in
  235. the graph
  236. digraph G {
  237. a -> c;
  238. a -> b;
  239. b -> c [constraint=false];
  240. }
  241. the edge b -> c does not add a constraint during rank assignment, so
  242. the only constraints are that a be above b and c.
  243. decorate
  244. If true, attach edge label to edge by a 2-segment polyline, underlining
  245. the label, then going to the closest point of spline.
  246. dir
  247. Set edge type for drawing arrowheads.
  248. distortion
  249. Distortion factor for shape=polygon. Positive values cause top part to
  250. be larger than bottom; negative values do the opposite.
  251. fillcolor
  252. If fillcolor is not defined, color is used. If this is not defined, the
  253. default is used, except for shape=point or when the output format is
  254. MIF, which use black by default.
  255. fixedsize
  256. If true, the node size is kept fixed and not expanded to contain the
  257. text label.
  258. fontcolor
  259. Color used for text.
  260. fontname
  261. Font used for text.
  262. fontpath
  263. Directory list used by libgd to search for bitmap fonts. If fontpath is
  264. not set, the environment variable DOTFONTPATH is checked. If that is
  265. not set, GDFONTPATH is checked. If not set, libgd uses its compiled-in
  266. font path.
  267. fontsize
  268. Font size, in points, used for text.
  269. group
  270. If the end points of an edge belong to the same group, i.e., have the
  271. same group attribute, parameters are set to avoid crossings and keep
  272. the edges straight.
  273. headURL
  274. For the output format imap, or cmap, if headURL is defined, it is
  275. output as part of the head label of the edge. If headURL contains
  276. "\N", this will be replaced by the head label text.
  277. headlabel
  278. Text label to be placed near head of edge.
  279. headport
  280. Indicates where on the head node to attach the head of the edge. In the
  281. default case, the edge is aimed towards the center of the node, and
  282. then clipped at the node boundary.
  283. height
  284. Height of node, in inches.
  285. K constant used in the Fruchterman-Reingold force directed model.
  286. label
  287. Text label attached to objects. The escape sequences "\n", "\l" and
  288. "\r" divide the label into lines, centered, left-justified and
  289. right-justified, respectively. The escape sequence "\N" represents a
  290. node's name. If a node's shape is record, then the label can have a
  291. special format which describes the record layout.
  292. labelangle
  293. Angle, in degrees, that the headlabel(taillabel) is rotated from the
  294. angle the edge makes incident with the head(tail) node, respectively.
  295. labeldistance
  296. Multiplicative scaling factor adjusting the distance that the
  297. headlabel(taillabel) is the from head(tail) node.
  298. labelfloat
  299. If true, allows edge labels to be less constrained in position. In
  300. particular, it may appear on top of other edges.
  301. labelfontcolor
  302. Color used for headlabel and taillabel.
  303. labelfontname
  304. Font used for headlabel and taillabel.
  305. labelfontsize
  306. Font size, in points, used for headlabel and taillabel.
  307. labeljust
  308. Justification for cluster labels. If "r", the label is right-justified
  309. within bounding rectangle; otherwise, left-justified.
  310. labelloc
  311. Top/bottom placement of graph and cluster labels. If the attribute is
  312. "t", place label at the top; if the attribute is "b", place label at
  313. the bottom. By default, root graph labels go on the bottom and cluster
  314. labels go on the top.
  315. layer
  316. Specifies layers in which the node or edge is present.
  317. layers
  318. Specifies a linearly ordered list of layer names attached to the graph
  319. The graph is then output in separate layers. Only those components
  320. belonging to the current output layer appear. For more information, see
  321. the page How to use drawing layers (overlays).
  322. len
  323. Preferred edge length, in inches.
  324. levels
  325. Number of levels allowed in the multilevel scheme. Default is MAXINT.
  326. lhead
  327. Logical head of an edge. When compound is true, if lhead is defined and
  328. is the name of a cluster containing the real head, the edge is clipped
  329. to the boundary of the cluster.
  330. lp
  331. Label position, in points.
  332. ltail
  333. Logical tail of an edge. When compound is true, if ltail is defined and
  334. is the name of a cluster containing the real tail, the edge is clipped
  335. to the boundary of the cluster.
  336. margin
  337. Set x and y margins of canvas, in inches. In first case, both margins
  338. are set equal to the given value.
  339. maxiter
  340. Sets the number of iterations used.
  341. mclimit
  342. Multiplicative scale factor used to alter the MinQuit (default = 8) and
  343. MaxIter (default = 24) parameters used during crossing minimization.
  344. These correspond to the number of tries without improvement before
  345. quitting and the maximum number of iterations in each pass.
  346. minlen
  347. Minimum edge length (rank difference between head and tail).
  348. model
  349. If "circuit", use circuit resistance model to compute dissimilarity
  350. values; otherwise, use shortest path model.
  351. nodesep
  352. Minimum space between two adjacent nodes in the same rank, in inches.
  353. normalize
  354. If set, normalize coordinates of final layout so that the first point
  355. is at the origin, and then rotate the layout so that the first edge is
  356. horizontal.
  357. nslimit ,
  358. nslimit1
  359. Used to set number of iterations in network simplex applications.
  360. nslimit is used in computing node x coordinates, nslimit1 for ranking
  361. nodes. If defined, # iterations = nslimit(1) * # nodes; otherwise, #
  362. iterations = MAXINT.
  363. ordering
  364. If "out" for a graph G, and n is a node in G, then edges n->* appear
  365. left-to-right in the same order in which they are defined.
  366. orientation
  367. Angle, in degrees, used to rotate node shapes.
  368. orientation
  369. If "[lL]*", set graph orientation to landscape Used only if rotate is
  370. not defined.
  371. overlap
  372. If "scale", remove node overlaps by scaling; if converts to false,
  373. remove node overlaps by the Voronoi technique; otherwise, leave
  374. overlaps.
  375. page
  376. Width and height of output pages, in inches. If this is set and is
  377. smaller than the size of the layout, a rectangular array of pages of
  378. the specified page size is overlaid on the layout, with origins aligned
  379. in the lower-left corner, thereby partitioning the layout into pages.
  380. The pages are then produced one at a time, in pagedir order.
  381. pagedir
  382. If the page attribute is set and applicable, this attribute specifies
  383. the order in which the pages are emitted. This is limited to one of the
  384. 8 row or column major orders.
  385. peripheries
  386. Set number of peripheries used in polygonal shapes.
  387. pin
  388. If true and the node has a pos attribute on input, neato prevents the
  389. node from moving from the input position. This property can also be
  390. specified in the pos attribute itself (cf. the point type).
  391. pos
  392. Position of node, or spline control points, in points. In neato, pos
  393. can be used to set initial position of a node. Concerning this, see the
  394. -s command line flag.
  395. quantum
  396. If quantum > 0.0, node label dimensions will be rounded to integral
  397. multiples of the quantum.
  398. quadtree
  399. Quadtree scheme to use. Values are "normal" (default), "fast" or "none".
  400. "fast" gives about 2-4 overall speedup compared with "normal", though
  401. layout quality can suffer a little.
  402. rank
  403. Rank constraints on the nodes in a subgraph. If rank="same", all nodes
  404. are placed on the same rank. If rank="min", all nodes are placed on the
  405. minimum rank. If rank="source", all nodes are placed on the minimum
  406. rank, and the only nodes on the minimum rank belong to some subgraph
  407. whose rank attribute is "source" or "min". Analogous criteria hold for
  408. rank="max" and rank="sink". (Note: the minimum rank is topmost or
  409. leftmost, and the maximum rank is bottommost or rightmost.)
  410. rankdir
  411. Sets direction of graph layout. If rankdir="LR", the graph is laid out
  412. from left to right, i.e., directed edges tend to go from left to right.
  413. By default, graphs are laid out from top to bottom.
  414. ranksep
  415. In dot, this the gives desired rank separation, in inches. This is the
  416. minimum vertical distance between the bottom of the nodes in one rank
  417. and the tops of nodes in the next. If the value contains "equally", the
  418. centers of all ranks are spaced equally apart. Note that both settings
  419. are possible, e.g., ranksep = "1.2 equally". In twopi, specifies radial
  420. separation of ranks.
  421. ratio
  422. Sets the aspect ratio (drawing height/drawing width) for the drawing.
  423. Note that this is adjusted before the size attribute constraints are
  424. enforced.
  425. If ratio is numeric, it is taken as the desired aspect ratio. Then, if
  426. the actual aspect ratio is less than the desired ratio, the drawing
  427. height is scaled up to achieve the desired ratio; if the actual ratio
  428. is greater than that desired ratio, the drawing width is scaled up.
  429. If ratio = "fill" and the size attribute is set, the drawing is scaled
  430. to achieve the aspect ratio implied by size. As size is set, when the
  431. drawing is later scaled to fit that rectangle, the resulting picture
  432. will fill the rectangle.
  433. If ratio = "compress" and the size attribute is set, dot attempts to
  434. compress the initial layout to fit in the given size. This achieves a
  435. tighter packing of nodes but reduces the balance and symmetry.
  436. If ratio = "auto", the page attribute is set and the graph cannot be
  437. drawn on a single page, then size is set to an ``ideal'' value. In
  438. particular, the size in a given dimension will be the smallest integral
  439. multiple of the page size in that dimension which is at least half the
  440. current size. The two dimensions are then scaled independently to the
  441. new size.
  442. rects
  443. Rectangles for fields of records, in points.
  444. regular
  445. If true, force polygon to be regular.
  446. repulsiveforce
  447. The power of repulsive force used in an extended Fruchterman-Reingold
  448. force directed model. Default is 1. Values larger than 1 tend to reduce
  449. the warping effect at the expensive of less clustering.
  450. remincross
  451. If true and there are multiple clusters, run cross minimization a
  452. second time.
  453. rotate
  454. If 90, set drawing orientation to landscape.
  455. samehead
  456. Edges with the same head and the same samehead value are aimed at the
  457. same point on the head.
  458. sametail
  459. Edges with the same tail and the same sametail value are aimed at the
  460. same point on the tail.
  461. samplepoints
  462. If the input graph defines the vertices attribute, and output is plain*
  463. or attributed dot, this give the number of points used to represent
  464. circles and ellipses. It plays the same role in neato, when adjusting
  465. the layout to avoid overlapping nodes.
  466. searchsize
  467. During network simplex, maximum number of edges with negative cut
  468. values to search when looking for one with minimum cut value.
  469. sep
  470. Fraction to increase polygons (multiply coordinates by 1 + sep) for
  471. purposes of determining overlap. Guarantees a minimal non-zero distance
  472. between nodes.
  473. shape
  474. Set shape of node.
  475. shapefile
  476. For output format is ps* or svg*, if non-empty, taken as a filename
  477. containing a device-dependent description of a node's shape.
  478. showboxes
  479. Print guide boxes in PostScript at the beginning of routesplines if 1,
  480. or at the end if 2. (Debugging)
  481. sides
  482. Number of sides if shape=polygon.
  483. size
  484. Maximum width and height of drawing, inches. If defined and the drawing
  485. is too large, the drawing is uniformly scaled down so that it fits
  486. within the given size. Note that there is some interaction between the
  487. size and ratio attributes.
  488. skew
  489. Skew factor for shape=polygon. Positive values skew top of polygon to
  490. right; negative to left.
  491. smoothing
  492. A post processing step to smooth out uneven distribution of nodes. Possible
  493. values are "none" (default), "avg_dist", "graph_dist", "power_dist", "rng",
  494. "spring" and "triangle".
  495. splines
  496. If true, draw edges as splines. This requires non-overlapping nodes
  497. (cf. overlap).
  498. start
  499. Parameter used to determine the initial layout of nodes. By default,
  500. nodes are randomly placed in a square whose sides have length (#
  501. nodes). The same seed is always used for the random number generator,
  502. so the initial placement is repeatable. If start converts to an
  503. integer, this is used as a seed value for the random number generator.
  504. If start is "regular", the nodes are placed regularly about a circle.
  505. Finally, if start is defined but is not one of the above cases, the
  506. current time is used to pick a seed.
  507. style
  508. Set style for node or edge. For cluster subgraph, if "filled", the
  509. cluster box's background is filled.
  510. stylesheet
  511. The URL of a CSS stylesheet to be referenced from the output file.
  512. Relevant only for SVG output.
  513. tailURL
  514. When the output format is imap, or cmap, if tailURL is defined, it is
  515. output as part of the tail label of the edge. If tailURL
  516. contains "\N", this will be replaced by the tail label text.
  517. taillabel
  518. Text label to be placed near tail of edge.
  519. tailport
  520. Indicates where on the tail node to attach the tail of the edge.
  521. toplabel
  522. Additional label near top of nodes of shape M*.
  523. vertices
  524. If the input graph defines this attribute, the node is polynomial, and
  525. output is plain* or attributed dot, this attribute provides the
  526. coordinates of the vertices of the node's polynomial, in points. If the
  527. node is an ellipse or circle, the samplepoints attribute affects the
  528. output.
  529. voro_margin
  530. Factor to scale up drawing to allow margin for expansion in Voronoi
  531. technique. dim' = (1+2*margin)*dim.
  532. w
  533. Redundant definition of weight in neato, cf. bug 9.
  534. weight
  535. Weight of edge. Usually, the heavier the weight, the shorter (and, in
  536. dot, straighter and more vertical) an edge is.
  537. width
  538. Width of node, in inches.
  539. z
  540. Provides z coordinate for the node when output format is VRML.
  541. ------------------------------------------------------------------------
  542. Attribute Type Descriptions
  543. arrowType
  544. "normal" "inv"
  545. "dot" "invdot"
  546. "odot" "invodot"
  547. "none"
  548. clusterMode
  549. "local","global","none"
  550. color
  551. "#%2x%2x%2x" RGB
  552. "#%2x%2x%2x%2x"RGBA
  553. "%lf,%lf,%lf" HSV 0.0 <= values <= 1.0
  554. string color name
  555. dirType
  556. For an edge T -> H;
  557. "forward" "back"
  558. "both" "none"
  559. For undirected edges T -- H;, one of the nodes, usually the righthand
  560. one, is treated as the head for the purpose of interpreting "forward"
  561. and "back".
  562. layerList
  563. list of strings separated by colons, tabs or spaces, defining layer
  564. names and implicitly numbered 1,2,...
  565. layerRange
  566. layerId or layerId[:\t ]layerId,
  567. where layerId = "all", decimal integer or layer name. (An integer i
  568. corresponds to layer i.)
  569. pagedir
  570. "BL", "BR", "TL", "TR", "RB", "RT", "LB", "LT". These specify the 8 row
  571. or column major orders for traversing a rectangular array, the first
  572. character corresponding to the major order and the second to the minor
  573. order. Thus, for "BL", the major order is from bottom to top, and the
  574. minor order is from left to right. This means the bottom row is
  575. traversed first, from left to right, then the next row up, from left to
  576. right, and so on, until the topmost row is traversed.
  577. point
  578. "%d,%d"('!') representing the point (x,y). The optional '!' indicates
  579. the node position should not change (input-only).
  580. pointf
  581. "%lf,%lf" representing the point (x,y).
  582. pointfList
  583. list of pointf, separated by spaces.
  584. portPos
  585. "n","ne","e","se","s","sw","w","nw" These correspond to the obvious
  586. compass points on the node.
  587. rankType
  588. "same", "min", "source", "max", "sink"
  589. rankdir
  590. "LR". Any other value corresponds to a top-down layout.
  591. rect
  592. "%d,%d,%d,%d" The rect llx,lly,urx,ury gives the coordinates, in
  593. points, of the lower-left corner (llx,lly) and the upper-right corner
  594. (urx,ury).
  595. shape
  596. A string specifying the shape of a node. There are three main types of
  597. shapes : polygon-based, record-based and PostScript-based.
  598. splineType
  599. spline ( ';' spline )*
  600. where spline= (startp)? (endp)? point (triple)]*
  601. and triple = point point point
  602. and endp = "e,%d,%d"
  603. and startp = "s,%d,%d"
  604. If a spline has points p1 p2 p3 ... pn, (n = 1 (mod 3)), the points
  605. correspond to the control points of a B-spline from p1 to pn. If startp
  606. is given, it touches one node of the edge, and the arrowhead goes from
  607. p1 to startp. If startp is not given, p1 touches a node. Similarly for
  608. pn and endp.
  609. style
  610. styleItem ( ',' styleItem )*
  611. where styleItem= name or name'('args')'
  612. and args = name ( ',' name )*
  613. and name = [^)(, ][^)(,]*
  614. At present, the recognized style names comprise "dashed", "dotted",
  615. "solid", "invis" and "bold" for nodes and edges, and "filled",
  616. "diagonals" and "rounded" for nodes only. Additional styles are
  617. available in device-dependent form. Style lists are passed to device
  618. drivers, which can use this to generate appropriate output.
  619. Note that, at present, "rounded" cancels "filled", except for circles
  620. and ellipses. This holds for the Mrecord shape, which is rounded by
  621. definition.
  622. ------------------------------------------------------------------------
  623. Output Formats
  624. ------------------------------------------------------------------------
  625. The output format is specified with the -Tlang flag on the command line,
  626. where lang is one of the following:
  627. Command-line
  628. parameter Format
  629. canon
  630. cmap Client-side imagemap
  631. dot DOT
  632. fig FIG
  633. gd
  634. gd2 GD/GD2 formats
  635. gif GIF
  636. imap Server-side imagemap
  637. ismap Server-side imagemap (deprecated)
  638. jpg
  639. jpeg JPEG
  640. mif FrameMaker MIF format
  641. mp MetaPost
  642. pcl PCL
  643. pic PIC
  644. plain
  645. plain-ext Simple text format
  646. png Portable Network Graphics format
  647. ps PostScript
  648. ps2 PostScript for PDF
  649. svg
  650. svgz Scalable Vector Graphics
  651. vrml VRML
  652. vtx Visual Thought format
  653. wbmp Wireless BitMap format
  654. ------------------------------------------------------------------------
  655. Format Descriptions
  656. canon ,
  657. dot
  658. These two formats produce output in variations of the dot language.
  659. Using canon produces a prettyprinted version of the input, with no
  660. layout performed.
  661. dot corresponds to attributed dot, and is the default output format. It
  662. reproduces the input, along with layout information for the graph. In
  663. particular, a bb attribute is attached to the graph, specifying the
  664. bounding box of the drawing. If the graph has a label, its position is
  665. specified by the lp attribute.
  666. Each node gets pos, width and height attributes. If the node is a
  667. record, the record rectangles are given in the rects attribute. If the
  668. node is a polygon and the vertices attribute is defined, this attribute
  669. contains the vertices of the node.
  670. Every edge is assigned a pos attribute, and if the edge has a label,
  671. the label position is given in lp.
  672. fig
  673. Outputs graphs in the FIG graphics language.
  674. gd ,
  675. gd2
  676. Output images in the GD and GD2 format. These are the internal formats
  677. used by the gd library. The latter is compressed.
  678. gif
  679. Outputs GIF bitmap images.
  680. imap
  681. cmap
  682. Produces map files for server-side and client-side image maps,
  683. respectively. These can be used in a web page with a graphical
  684. form of the output, e.g. in JPEG or GIF format, to attach links
  685. to nodes and edges. For example, given the dot file
  686. /* x.gv */
  687. digraph G {
  688. URL="http://www.research.att.com/";
  689. command [URL="command.html"];
  690. command -> output [URL="colors.html"];
  691. }
  692. this can be processed twice:
  693. dot -Timap > x.map
  694. dot -Tgif > x.gif
  695. and then be referred to in a web page, such as
  696. <A HREF="x.map">
  697. <IMG SRC="x.gif" ISMAP>
  698. </A>
  699. URLs can be attached to the root graph, nodes and edges. If the URL of
  700. a node contains the escape sequence "\N", it will be replaced by the
  701. node's name. If an edge has a URL, various points along the edge (but
  702. not the head or tail) will link to it. In addition, if the edge has a
  703. label, that will link to the URL.
  704. As for the head of the edge, this is linked to the headURL, if set.
  705. Otherwise, it is linked to the edge's URL if that is defined. If the
  706. headURL contains the escape sequence "\N", it will be replaced by the
  707. headlabel, if defined. The analogous description holds for the tail,
  708. tailURL and taillabel.
  709. ismap
  710. Produces HTML image map files. This is a predecessor (circa 1994) of
  711. the IMAP format. Most servers now user the latter. URLs can be attached
  712. to the root graph, nodes and edges. Since edge links are attached to
  713. edge labels, an edge must have a label for its URL to be used. For both
  714. nodes and edges, if the URL has the escape sequence "\N" embedded in
  715. its string, this will be replaced with the node or edge name.
  716. jpg ,
  717. jpeg
  718. Output JPEG compressed image files. This format relies on the
  719. installation having the JPEG library.
  720. mif
  721. Generates Frame Maker MIF files.
  722. mp
  723. Produces MetaPost output.
  724. pcl
  725. Produces output in the PCL printer language. HP-GL is a subset of PCL,
  726. so that PCL output is the same as HP-GL, wrapped with some initial and
  727. final commands to set the printer to and from HP-GL mode.
  728. pic
  729. Outputs in PIC, the picture description language in the troff-family
  730. plain ,
  731. plain-ext
  732. The plain and plain-ext formats produce output using a simple,
  733. line-based language. The latter format differs in that, on edges, it
  734. provides port names on head and tail nodes when applicable.
  735. There are four types of statements.
  736. graph scale width height
  737. node name x y width height label style shape color fillcolor
  738. edge tail head n x1 y1 .. xn yn [label xl yl] style color
  739. stop
  740. graph
  741. The width and height values give the width and height of the
  742. drawing. The lower left corner of the drawing is at the origin.
  743. The scale value indicates how the drawing should be scaled if a
  744. size attribute was given and the drawing needs to be scaled to
  745. conform to that size. If no scaling is necessary, it will be set
  746. to 1.0. Note that all graph, node and edge coordinates and lengths
  747. are given unscaled.
  748. node
  749. The name value is the name of the node, and x and y give the
  750. node's position. The width and height are the width and height of
  751. the node. The label, style, shape, color and fillcolor give the
  752. node's label, style, shape, color and fillcolor, respectively,
  753. using attribute default values where necessary. If the node does
  754. not have a style attribute, "solid" is used.
  755. edge
  756. The tail and head values give the names of the head and tail
  757. nodes. n is the number of control points defining the B-spline
  758. forming the edge. This is followed by 2*n numbers giving the x and
  759. y coordinates of the control points in order from tail to head. If
  760. the edge has a label, this comes next followed by the x and y
  761. coordinates of the label's position. The edge description is
  762. completed by the edge's style and color. As with nodes, if a style
  763. is not defined, "solid" is used.
  764. The output consists of one graph line, a sequence of node lines, one
  765. per node, a sequence of edge lines, one per edge, and a final stop
  766. line. All units are in inches, represented by a floating point number.
  767. png
  768. Produces output in the PNG (Portable Network Graphics) format. PNG
  769. relies on having libz and the PNG library.
  770. ps
  771. Produces PostScript output.
  772. ps2
  773. Produces PostScript output with PDF notations. It is assumed the output
  774. will be directly converted into PDF format. The notations include PDF
  775. bounding box information, so that the resulting PDF file can be
  776. correctly used with pdf tools, such as pdflatex. In addition, if a node
  777. has a URL attribute, this gets translated into PDF code such that the
  778. node, when viewed in a PDF-viewer, e.g., acroread, is a link to the
  779. given URL. If a URL is attached to the graph, this serves as a base,
  780. such that relative URLs on nodes are derived from it.
  781. svg ,
  782. svgz
  783. Produce SVG output, the latter in compressed format. SVG relies on
  784. having libz.
  785. vrml
  786. Outputs graphs in the VRML format. VRML relies on having the PNG
  787. library.
  788. vtx
  789. Generates graph diagrams in the format for Confluents's Visual Thought.
  790. wbmp
  791. Produces output in the Wireless BitMap (WBMP) format, optimized for
  792. mobile computing.
  793. ------------------------------------------------------------------------