Command-line parameter | Format |
---|---|
canon
dot xdot | DOT |
cmap | Client-side imagemap (deprecated) |
dia | Dia format |
fig | FIG |
gd
gd2 | GD/GD2 formats |
gif | GIF |
hpgl | HP-GL/2 |
imap
cmapx | Server-side and client-side imagemaps |
ismap | Server-side imagemap (deprecated) |
jpg
jpeg | JPEG |
mif | FrameMaker MIF format |
mp | MetaPost |
pcl | PCL |
pic | PIC |
plain
plain-ext | Simple text format |
png | Portable Network Graphics format |
ps | PostScript |
ps2 | PostScript for PDF |
svg
svgz | Scalable Vector Graphics |
vrml | VRML |
vtx | Visual Thought format |
wbmp | Wireless BitMap format |
The dot option corresponds to attributed dot output, and is the default output format. It reproduces the input, along with layout information for the graph. In particular, a bb attribute is attached to the graph, specifying the bounding box of the drawing. If the graph has a label, its position is specified by the lp attribute.
Each node gets pos, width and height attributes. If the node is a record, the record rectangles are given in the rects attribute. If the node is a polygon and the vertices attribute is defined, this attribute contains the vertices of the node.
Every edge is assigned a pos attribute, and if the edge has a label, the label position is given in lp.
The xdot format extends the dot format by providing much more detailed information about how graph components are drawn. It relies on additional attributes for nodes, edges and graphs. The format is preliminary; comments and suggestions for better representations are welcome. Not also that we will have to extend the descriptions in the near future to handle richer record and text representations.
At present, additional drawing attributes are only attached to nodes
and edges. There are six new attributes:
_draw_ Drawing operations
_ldraw_ Label drawing
_hdraw_ Head arrowhead Edge only
_tdraw_ Tail arrowhead Edge only
_hldraw_ Head label Edge only
_tldraw_ Tail label Edge only
The value of these attributes consists of the concatenation of some
(multi-)set of the following 7 rendering operations.
E x0 y0 w h
Filled ellipse ((x-x0)/w)2 + ((y-y0)/h)2 = 1
e x0 y0 w h
Unfilled ellipse ((x-x0)/w)2 + ((y-y0)/h)2 = 1
P n x1 y1 ... xn yn
Filled polygon using the given n points
p n x1 y1 ... xn yn
Unfilled polygon using the given n points
L n x1 y1 ... xn yn
Polyline using the given n points
B n x1 y1 ... xn yn
B-spline using the given n control points
T x y j w n -c1c2...cn
Text drawn using the baseline point (x,y). The text consists of the
n characters following '-'. The text should be left-aligned (centered,
right-aligned) on the point if j is -1 (0, 1), respectively. The value
w gives the width of the text as computed by the library.
The text operation is only used in the label attributes. Normally, the non-text operations are only used in the non-label attributes; if, however, the decorate attribute is set on an edge, its label attribute will also contain a polyline operation.
All coordinates and sizes are in points. Additional information such a line style, fill color, font name or size must be gleaned from the corresponding attributes of the component. Note though that if an edge or node is invisible, no drawing operations are attached to it.
/* x.dot */ digraph G { URL="http://www.research.att.com/base.html"; command [URL="http://www.research.att.com/command.html"]; command -> output [URL="colors.html"]; }one would process the graph twice:
dot -Timap x.dot > x.map dot -Tgif x.dot > x.gifand then refer to it in a web page:
dot -Tcmapx x.dot > x.map dot -Tgif x.dot > x.gifand uses the HTML
If the URL of a node contains the escape sequence "\N", it will be replaced by the node's name. If the headURL is defined and contains the escape sequence "\N", it will be replaced by the headlabel, if defined. The analogous result holds for the tailURL and the taillabel.
There are four types of statements.
graph scale width height node name x y width height label style shape color fillcolor edge tail head n x1 y1 .. xn yn [label xl yl] style color stop
Line segments are drawn as cylinders. In general, VRML output relies on having the PNG library to produce images used to texture-fill the node shapes. However, if shape=point, a node is drawn as a 3D sphere.