annotate toolboxes/graph_visualisation/share/graphviz/doc/html/info/output.html @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
Daniel@0 2 <!--
Daniel@0 3 This is a generated document. Do not edit.
Daniel@0 4 -->
Daniel@0 5 <HTML VERSION="2.0">
Daniel@0 6 <HEAD>
Daniel@0 7 <TITLE>Output Formats</TITLE>
Daniel@0 8 </HEAD>
Daniel@0 9 <BODY BGCOLOR=white>
Daniel@0 10 <A NAME="top"></A>
Daniel@0 11 <H1 align=CENTER>Output Formats</H1>
Daniel@0 12 <HR>
Daniel@0 13 The output format is specified with the <STRONG>-T</STRONG><I>lang</I>
Daniel@0 14 flag on the <A HREF=command.html>command line</A>, where <I>lang</I>
Daniel@0 15 is one of the parameters listed below.
Daniel@0 16 <P>
Daniel@0 17 The formats actually available in a given Graphviz system depend on
Daniel@0 18 how the system was built and the presence of additional libraries.
Daniel@0 19 To see what formats <b>dot</b> supports, run <TT>dot -T?</TT>.
Daniel@0 20 See the <A HREF=command.html#d.T> description of the -T</A>
Daniel@0 21 flag for additional information.
Daniel@0 22 <P>
Daniel@0 23 Note that the internal coordinate system has the origin
Daniel@0 24 in the lower left corner.
Daniel@0 25 Thus, positions in the
Daniel@0 26 <A HREF=#d:canon>canon</A>,
Daniel@0 27 <A HREF=#d:dot>dot</A>,
Daniel@0 28 <A HREF=#d:xdot>xdot</A>,
Daniel@0 29 <A HREF=#d:plain>plain</A>, and
Daniel@0 30 <A HREF=#d:plain-ext>plain-ext</A>
Daniel@0 31 formats need to be interpreted in this manner.
Daniel@0 32 <P>
Daniel@0 33 <TABLE ALIGN=CENTER>
Daniel@0 34 <TR><TH>Command-line<BR>parameter</TH><TH>Format</TH></TR>
Daniel@0 35 <TR><TD ALIGN=CENTER><A NAME=a:bmp HREF=#d:bmp>bmp</A>
Daniel@0 36 </TD><TD>Windows Bitmap Format</TD> </TR>
Daniel@0 37 <TR><TD ALIGN=CENTER><A NAME=a:canon HREF=#d:canon>canon</A>
Daniel@0 38 <BR><A NAME=a:dot HREF=#d:dot>dot</A>
Daniel@0 39 <BR><A NAME=a:xdot HREF=#d:xdot>xdot</A>
Daniel@0 40 </TD><TD>DOT</TD> </TR>
Daniel@0 41 <TR><TD ALIGN=CENTER><A NAME=a:cmap HREF=#d:cmap>cmap</A>
Daniel@0 42 </TD><TD>Client-side imagemap (deprecated)</TD> </TR>
Daniel@0 43 <TR><TD ALIGN=CENTER><A NAME=a:dia HREF=#d:dia>dia</A>
Daniel@0 44 </TD><TD>Dia format</TD> </TR>
Daniel@0 45 <TR><TD ALIGN=CENTER><A NAME=a:eps HREF=#d:eps>eps</A>
Daniel@0 46 </TD><TD>Encapsulated PostScript</TD> </TR>
Daniel@0 47 <TR><TD ALIGN=CENTER><A NAME=a:fig HREF=#d:fig>fig</A>
Daniel@0 48 </TD><TD>FIG</TD> </TR>
Daniel@0 49 <TR><TD ALIGN=CENTER><A NAME=a:gd HREF=#d:gd>gd</A>
Daniel@0 50 <BR><A NAME=a:gd2 HREF=#d:gd2>gd2</A>
Daniel@0 51 </TD><TD>GD/GD2 formats</TD> </TR>
Daniel@0 52 <TR><TD ALIGN=CENTER><A NAME=a:gif HREF=#d:gif>gif</A>
Daniel@0 53 </TD><TD>GIF</TD> </TR>
Daniel@0 54 <TR><TD ALIGN=CENTER><A NAME=a:gtk HREF=#d:gtk>gtk</A>
Daniel@0 55 </TD><TD>GTK canvas</TD> </TR>
Daniel@0 56 <TR><TD ALIGN=CENTER><A NAME=a:hpgl HREF=#d:hpgl>hpgl</A>
Daniel@0 57 </TD><TD>HP-GL/2</TD> </TR>
Daniel@0 58 <TR><TD ALIGN=CENTER><A NAME=a:ico HREF=#d:ico>ico</A>
Daniel@0 59 </TD><TD>Icon Image File Format</TD> </TR>
Daniel@0 60 <TR><TD ALIGN=CENTER><A NAME=a:imap HREF=#d:imap>imap</A>
Daniel@0 61 <BR><A NAME=a:cmapx HREF=#d:cmapx>cmapx</A>
Daniel@0 62 </TD><TD>Server-side and client-side imagemaps</TD> </TR>
Daniel@0 63 <TR><TD ALIGN=CENTER><A NAME=a:imap_np HREF=#d:imap_np>imap_np</A>
Daniel@0 64 <BR><A NAME=a:cmapx_np HREF=#d:cmapx_np>cmapx_np</A>
Daniel@0 65 </TD><TD>Server-side and client-side imagemaps</TD> </TR>
Daniel@0 66 <TR><TD ALIGN=CENTER><A NAME=a:ismap HREF=#d:ismap>ismap</A>
Daniel@0 67 </TD><TD>Server-side imagemap (deprecated)</TD> </TR>
Daniel@0 68 <TR><TD ALIGN=CENTER><A NAME=a:jpg HREF=#d:jpg>jpg</A>
Daniel@0 69 <BR><A NAME=a:jpeg HREF=#d:jpeg>jpeg</A>
Daniel@0 70 <BR><A NAME=a:jpe HREF=#d:jpe>jpe</A>
Daniel@0 71 </TD><TD>JPEG</TD> </TR>
Daniel@0 72 <TR><TD ALIGN=CENTER><A NAME=a:mif HREF=#d:mif>mif</A>
Daniel@0 73 </TD><TD>FrameMaker MIF format</TD> </TR>
Daniel@0 74 <TR><TD ALIGN=CENTER><A NAME=a:mp HREF=#d:mp>mp</A>
Daniel@0 75 </TD><TD>MetaPost</TD> </TR>
Daniel@0 76 <TR><TD ALIGN=CENTER><A NAME=a:pcl HREF=#d:pcl>pcl</A>
Daniel@0 77 </TD><TD>PCL</TD> </TR>
Daniel@0 78 <TR><TD ALIGN=CENTER><A NAME=a:pdf HREF=#d:pdf>pdf</A>
Daniel@0 79 </TD><TD>Portable Document Format (PDF)</TD> </TR>
Daniel@0 80 <TR><TD ALIGN=CENTER><A NAME=a:pic HREF=#d:pic>pic</A>
Daniel@0 81 </TD><TD>PIC</TD> </TR>
Daniel@0 82 <TR><TD ALIGN=CENTER><A NAME=a:plain HREF=#d:plain>plain</A>
Daniel@0 83 <BR><A NAME=a:plain-ext HREF=#d:plain-ext>plain-ext</A>
Daniel@0 84 </TD><TD>Simple text format</TD> </TR>
Daniel@0 85 <TR><TD ALIGN=CENTER><A NAME=a:png HREF=#d:png>png</A>
Daniel@0 86 </TD><TD>Portable Network Graphics format</TD> </TR>
Daniel@0 87 <TR><TD ALIGN=CENTER><A NAME=a:ps HREF=#d:ps>ps</A>
Daniel@0 88 </TD><TD>PostScript</TD> </TR>
Daniel@0 89 <TR><TD ALIGN=CENTER><A NAME=a:ps2 HREF=#d:ps2>ps2</A>
Daniel@0 90 </TD><TD>PostScript for PDF</TD> </TR>
Daniel@0 91 <TR><TD ALIGN=CENTER><A NAME=a:svg HREF=#d:svg>svg</A>
Daniel@0 92 <BR><A NAME=a:svgz HREF=#d:svgz>svgz</A>
Daniel@0 93 </TD><TD>Scalable Vector Graphics</TD> </TR>
Daniel@0 94 <TR><TD ALIGN=CENTER><A NAME=a:tga HREF=#d:tga>tga</A>
Daniel@0 95 </TD><TD>Truevision Targa Format (TGA)</TD> </TR>
Daniel@0 96 <TR><TD ALIGN=CENTER><A NAME=a:tif HREF=#d:tif>tif</A>
Daniel@0 97 <BR><A NAME=a:tiff HREF=#d:tiff>tiff</A>
Daniel@0 98 </TD><TD>TIFF (Tag Image File Format)</TD> </TR>
Daniel@0 99 <TR><TD ALIGN=CENTER><A NAME=a:vml HREF=#d:vml>vml</A>
Daniel@0 100 <BR><A NAME=a:vmlz HREF=#d:vmlz>vmlz</A>
Daniel@0 101 </TD><TD>Vector Markup Language (VML)</TD> </TR>
Daniel@0 102 <TR><TD ALIGN=CENTER><A NAME=a:vrml HREF=#d:vrml>vrml</A>
Daniel@0 103 </TD><TD>VRML</TD> </TR>
Daniel@0 104 <TR><TD ALIGN=CENTER><A NAME=a:vtx HREF=#d:vtx>vtx</A>
Daniel@0 105 </TD><TD>Visual Thought format</TD> </TR>
Daniel@0 106 <TR><TD ALIGN=CENTER><A NAME=a:wbmp HREF=#d:wbmp>wbmp</A>
Daniel@0 107 </TD><TD>Wireless BitMap format</TD> </TR>
Daniel@0 108 <TR><TD ALIGN=CENTER><A NAME=a:xlib HREF=#d:xlib>xlib</A>
Daniel@0 109 </TD><TD>Xlib canvas</TD> </TR>
Daniel@0 110 </TABLE>
Daniel@0 111 <HR>
Daniel@0 112 <H2>Format Descriptions</H2>
Daniel@0 113 <DL>
Daniel@0 114 <DT><A NAME=d:bmp HREF=#a:bmp><STRONG>bmp</STRONG></A>
Daniel@0 115 <DD>Outputs images in the Windows <A HREF="http://en.wikipedia.org/wiki/Bitmap">BMP</A> format.
Daniel@0 116
Daniel@0 117 <DT><A NAME=d:canon HREF=#a:canon><STRONG>canon</STRONG></A>
Daniel@0 118 ,<DT><A NAME=d:dot HREF=#a:dot><STRONG>dot</STRONG></A>
Daniel@0 119 ,<DT><A NAME=d:xdot HREF=#a:xdot><STRONG>xdot</STRONG></A>
Daniel@0 120 <DD>These formats produce output in the
Daniel@0 121 <A HREF=lang.html>dot language</A>.
Daniel@0 122 Using <B>canon</B> produces a prettyprinted version of the input,
Daniel@0 123 with no layout performed.
Daniel@0 124 <P>
Daniel@0 125 The <B>dot</B> option corresponds to attributed dot output,
Daniel@0 126 and is the default output format.
Daniel@0 127 It reproduces the input, along with layout information for the graph.
Daniel@0 128 In particular, a <A HREF=attrs.html#d:bb>bb</A> attribute is
Daniel@0 129 attached to the graph, specifying the bounding box of the drawing.
Daniel@0 130 If the graph has a label, its position is specified by the
Daniel@0 131 <A HREF=attrs.html#d:lp>lp</A> attribute.
Daniel@0 132 <P>
Daniel@0 133 Each node gets <A HREF=attrs.html#d:pos>pos</A>,
Daniel@0 134 <A HREF=attrs.html#d:width>width</A> and
Daniel@0 135 <A HREF=attrs.html#d:height>height</A> attributes. If the node is a record,
Daniel@0 136 the record rectangles are given in the
Daniel@0 137 <A HREF=attrs.html#d:rects>rects</A> attribute.
Daniel@0 138 If the node is a polygon and the
Daniel@0 139 <A HREF=attrs.html#d:vertices>vertices</A> attribute is defined, this
Daniel@0 140 attribute contains the vertices of the node.
Daniel@0 141 <P>
Daniel@0 142 Every edge is
Daniel@0 143 assigned a <A HREF=attrs.html#d:pos>pos</A> attribute,
Daniel@0 144 and if the edge has a label, the label position
Daniel@0 145 is given in <A HREF=attrs.html#d:lp>lp</A>.
Daniel@0 146 <P>
Daniel@0 147 The <B>xdot</B> format extends the
Daniel@0 148 <B>dot</B> format by providing much more detailed information about
Daniel@0 149 how graph components are drawn. It relies on additional attributes
Daniel@0 150 for nodes, edges and graphs.
Daniel@0 151 <P>
Daniel@0 152 The format is preliminary; comments and
Daniel@0 153 suggestions for better representations are welcome.
Daniel@0 154 To allow for changes in the format, Graphviz attaches the attribute
Daniel@0 155 <TT>xdotversion</TT> to the graph.
Daniel@0 156 <P>
Daniel@0 157 Additional drawing attributes can appear on nodes, edges, clusters and
Daniel@0 158 on the graph itself. There are six new attributes:
Daniel@0 159 <SPACER TYPE=VERTICAL size=10>
Daniel@0 160 <TABLE border bgcolor=beige>
Daniel@0 161 <TR><TD>_draw_<TD colspan=2>Drawing operations
Daniel@0 162 <TR><TD>_ldraw_<TD colspan=2>Label drawing
Daniel@0 163 <TR><TD>_hdraw_<TD>Head arrowhead<TD>Edge only
Daniel@0 164 <TR><TD>_tdraw_<TD>Tail arrowhead<TD>Edge only
Daniel@0 165 <TR><TD>_hldraw_<TD>Head label<TD>Edge only
Daniel@0 166 <TR><TD>_tldraw_<TD>Tail label<TD>Edge only
Daniel@0 167 </TABLE>
Daniel@0 168 <P>
Daniel@0 169 For a given graph object, one will typically a draw directive before the
Daniel@0 170 label directive. For example, for a node, one would first use the commands
Daniel@0 171 in <B>_draw_</B> followed by the commands in <B>_ldraw_</B>.
Daniel@0 172 <P>
Daniel@0 173 The value of these attributes consists of the concatenation of some
Daniel@0 174 (multi-)set of the following 13 rendering or attribute operations.
Daniel@0 175 (The number is parentheses gives the xdot version when the operation
Daniel@0 176 was added to the format. If no version number is given, the operation
Daniel@0 177 was in the original specification.)
Daniel@0 178 <SPACER TYPE=VERTICAL size=10>
Daniel@0 179 <TABLE border bgcolor=beige>
Daniel@0 180 <TR><TD>E x<sub>0</sub> y<sub>0</sub> w h
Daniel@0 181 <TD>Filled ellipse ((x-x<sub>0</sub>)/w)<sup>2</sup> + ((y-y<sub>0</sub>)/h)<sup>2</sup> = 1
Daniel@0 182 <TR><TD>e x<sub>0</sub> y<sub>0</sub> w h
Daniel@0 183 <TD>Unfilled ellipse ((x-x<sub>0</sub>)/w)<sup>2</sup> + ((y-y<sub>0</sub>)/h)<sup>2</sup> = 1
Daniel@0 184 <TR><TD>P n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
Daniel@0 185 <TD>Filled polygon using the given n points
Daniel@0 186 <TR><TD>p n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
Daniel@0 187 <TD>Unfilled polygon using the given n points
Daniel@0 188 <TR><TD>L n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
Daniel@0 189 <TD>Polyline using the given n points
Daniel@0 190 <TR><TD>B n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
Daniel@0 191 <TD>B-spline using the given n control points
Daniel@0 192 <TR><TD>b n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
Daniel@0 193 <TD>Filled B-spline using the given n control points (1.1)
Daniel@0 194 <TR><TD>T x y j w n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 195 <TD>Text drawn using the baseline point (x,y). The text consists of the
Daniel@0 196 n bytes following '-'. The text should be left-aligned (centered,
Daniel@0 197 right-aligned) on the point if j is -1 (0, 1), respectively. The value
Daniel@0 198 w gives the width of the text as computed by the library.
Daniel@0 199 <TR><TD>C n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 200 <TD>Set fill color. The color value consists of the
Daniel@0 201 n bytes following '-'. (1.1)
Daniel@0 202 <TR><TD>c n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 203 <TD>Set pen color. The color value consists of the
Daniel@0 204 n bytes following '-'. (1.1)
Daniel@0 205 <TR><TD>F s n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 206 <TD>Set font. The font size is s points. The font name consists of the
Daniel@0 207 n bytes following '-'. (1.1)
Daniel@0 208 <TR><TD>S n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 209 <TD>Set style attribute. The style value consists of the
Daniel@0 210 n bytes following '-'. The syntax of the value is the same as
Daniel@0 211 specified for a <B>styleItem</B> in <A HREF=attrs.html#k:style>style</A>. (1.1)
Daniel@0 212 <TR><TD>I x y w h n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
Daniel@0 213 <TD>Externally-specified image drawn in the box with lower left
Daniel@0 214 corner (x,y) and upper right corner (x+w,y+h). The name of the image
Daniel@0 215 consists of the n bytes following '-'. This is usually a bitmap
Daniel@0 216 image. Note that the image size, even when converted from pixels to
Daniel@0 217 points, might be different from the required size (w,h). It is
Daniel@0 218 assumed the renderer will perform the necessary scaling. (1.2)
Daniel@0 219 </TABLE>
Daniel@0 220 <P>
Daniel@0 221 Note that the filled figures (ellipses, polygons and B-Splines)
Daniel@0 222 imply two operations: first, drawing the filled figure with the
Daniel@0 223 current fill color; second, drawing an unfilled figure with the
Daniel@0 224 current pen color, pen width and pen style.
Daniel@0 225 the
Daniel@0 226 <P>
Daniel@0 227 Style values which can be incorporated in the graphics model do not
Daniel@0 228 appear in xdot output. In particular, the style values
Daniel@0 229 <TT>filled</TT>, <TT>rounded</TT>, <TT>diagonals</TT>, and <TT>invis</TT>
Daniel@0 230 will not appear. Indeed, if style contains <TT>invis</TT>,
Daniel@0 231 there will not be any xdot output at all.
Daniel@0 232 <P>
Daniel@0 233 In handling text alignment, the application may want to recompute the
Daniel@0 234 string width using its own rendering primitives.
Daniel@0 235 <P>
Daniel@0 236 The text operation is only used in the label attributes. Normally,
Daniel@0 237 the non-text operations are only used in the non-label attributes.
Daniel@0 238 If, however, the <A HREF=attrs.html#d:decorate>decorate</A>
Daniel@0 239 attribute is set on an edge, its label
Daniel@0 240 attribute will also contain a polyline operation.
Daniel@0 241 In addition, if a label is a complex, HTML-like label, it will also
Daniel@0 242 contain non-text operations.
Daniel@0 243 <P>
Daniel@0 244 All coordinates and sizes are in points.
Daniel@0 245 Note though that if
Daniel@0 246 an edge or node is invisible, no drawing operations are attached to it.
Daniel@0 247 <P>
Daniel@0 248 Version info:
Daniel@0 249 <TABLE border >
Daniel@0 250 <TR><TH>Xdot version</TH><TH>Graphviz version</TH></TR>
Daniel@0 251 <TR><TD>1.0</TD><TD>1.9</TD></TR>
Daniel@0 252 <TR><TD>1.1</TD><TD>2.8</TD></TR>
Daniel@0 253 <TR><TD>1.2</TD><TD>2.13</TD></TR>
Daniel@0 254 </TABLE>
Daniel@0 255
Daniel@0 256 <DT><A NAME=d:cmap HREF=#a:cmap><STRONG>cmap</STRONG></A>
Daniel@0 257 <DD>Produces map files for client-side image maps. The cmap format is
Daniel@0 258 mostly identical to cmapx, but the latter is well-formed XML amenable
Daniel@0 259 to processing by XML tools. In particular, the cmapx output is wrapped in
Daniel@0 260 &lt;map&gt;&lt;/map&gt;.
Daniel@0 261 <P>
Daniel@0 262 See <A HREF=#ID>Note</A>.
Daniel@0 263
Daniel@0 264 <DT><A NAME=d:dia HREF=#a:dia><STRONG>dia</STRONG></A>
Daniel@0 265 <DD>Produces <A HREF="http://www.gnome.org/projects/dia/">Dia</A> output.
Daniel@0 266
Daniel@0 267 <DT><A NAME=d:eps HREF=#a:eps><STRONG>eps</STRONG></A>
Daniel@0 268 <DD>Produces Encapsulated PostScript output.
Daniel@0 269 At present, this is only guaranteed to be correct for a single
Daniel@0 270 input graph since the Bounding Box information has to appear
Daniel@0 271 at the beginning of the output, and this will be based on the first graph.
Daniel@0 272
Daniel@0 273 <DT><A NAME=d:fig HREF=#a:fig><STRONG>fig</STRONG></A>
Daniel@0 274 <DD>Outputs graphs in the FIG graphics language.
Daniel@0 275
Daniel@0 276 <DT><A NAME=d:gd HREF=#a:gd><STRONG>gd</STRONG></A>
Daniel@0 277 ,<DT><A NAME=d:gd2 HREF=#a:gd2><STRONG>gd2</STRONG></A>
Daniel@0 278 <DD>Output images in the GD and GD2 format. These are the internal
Daniel@0 279 formats used by the gd library. The latter is compressed.
Daniel@0 280
Daniel@0 281 <DT><A NAME=d:gif HREF=#a:gif><STRONG>gif</STRONG></A>
Daniel@0 282 <DD>Outputs GIF bitmap images.
Daniel@0 283
Daniel@0 284 <DT><A NAME=d:gtk HREF=#a:gtk><STRONG>gtk</STRONG></A>
Daniel@0 285 <DD>Creates a <A HREF="http://www.gtk.org/">GTK</A> window and displays the output there.
Daniel@0 286
Daniel@0 287 <DT><A NAME=d:hpgl HREF=#a:hpgl><STRONG>hpgl</STRONG></A>
Daniel@0 288 <DD>Produces output in the HP-GL/2 vector graphic printer language.
Daniel@0 289
Daniel@0 290 <DT><A NAME=d:ico HREF=#a:ico><STRONG>ico</STRONG></A>
Daniel@0 291 <DD>Outputs images in the Windows <A HREF="http://en.wikipedia.org/wiki/ICO_(icon_image_file_format)">ICO format</A>.
Daniel@0 292
Daniel@0 293 <DT><A NAME=d:imap HREF=#a:imap><STRONG>imap</STRONG></A>
Daniel@0 294 ,<DT><A NAME=d:cmapx HREF=#a:cmapx><STRONG>cmapx</STRONG></A>
Daniel@0 295 <DD>Produces map files for server-side and client-side image maps,
Daniel@0 296 These can be used in a web page with
Daniel@0 297 a graphical form of the output, e.g. in JPEG or GIF format, to attach
Daniel@0 298 links to nodes and edges. For example, to create a server-side map
Daniel@0 299 given the dot file
Daniel@0 300 <PRE>
Daniel@0 301 /* x.dot */
Daniel@0 302 digraph mainmap {
Daniel@0 303 URL="http://www.research.att.com/base.html";
Daniel@0 304 command [URL="http://www.research.att.com/command.html"];
Daniel@0 305 command -> output [URL="colors.html"];
Daniel@0 306 }
Daniel@0 307 </PRE>
Daniel@0 308 one would process the graph and generate two output files:
Daniel@0 309 <PRE>
Daniel@0 310 dot -Timap -ox.map -Tgif -ox.gif x.dot
Daniel@0 311 </PRE>
Daniel@0 312 and then refer to it in a web page:
Daniel@0 313 <XMP>
Daniel@0 314 <A HREF="x.map"><IMG SRC="x.gif" ismap="ismap" /></A>
Daniel@0 315 </XMP>
Daniel@0 316 For client-side maps, one again generates two output files:
Daniel@0 317 <PRE>
Daniel@0 318 dot -Tcmapx -ox.map -Tgif -ox.gif x.dot
Daniel@0 319 </PRE>
Daniel@0 320 and uses the HTML
Daniel@0 321 <XMP>
Daniel@0 322 <IMG SRC="x.gif" USEMAP="#mainmap" />
Daniel@0 323 ... [content of x.map] ...
Daniel@0 324 </XMP>
Daniel@0 325 <A HREF=attrs.html#d:URL>URLs</A> can be attached to the root
Daniel@0 326 graph, nodes and edges. If a node has a URL, clicking in the node
Daniel@0 327 will activate the link.
Daniel@0 328 If an edge has a URL, various
Daniel@0 329 points along the edge (but not necessarily the head or tail)
Daniel@0 330 will link to it. In addition, if the edge has a
Daniel@0 331 <A HREF=attrs.html#d:label>label</A>, that will link
Daniel@0 332 to the URL.
Daniel@0 333 As for the head of the edge, this is linked to the
Daniel@0 334 <A HREF=attrs.html#d:headURL>headURL</A>, if set.
Daniel@0 335 Otherwise, it is linked to the edge's URL if that is defined.
Daniel@0 336 The analogous description holds for the tail and the
Daniel@0 337 <A HREF=attrs.html#d:tailURL>tailURL</A>.
Daniel@0 338 A URL associated with the graph is used as a default link.
Daniel@0 339 <P>
Daniel@0 340 If the URL
Daniel@0 341 of a node contains the escape sequence "\N", it will be replaced by
Daniel@0 342 the node's name.
Daniel@0 343 If the headURL is defined and contains the escape sequence "\N",
Daniel@0 344 it will be replaced by
Daniel@0 345 the <A HREF=attrs.html#d:headlabel>headlabel</A>, if defined.
Daniel@0 346 The analogous result holds for the tailURL and the
Daniel@0 347 <A HREF=attrs.html#d:taillabel>taillabel</A>.
Daniel@0 348 <P>
Daniel@0 349 See <A HREF=#ID>Note</A>.
Daniel@0 350
Daniel@0 351 <DT><A NAME=d:imap_np HREF=#a:imap_np><STRONG>imap_np</STRONG></A>
Daniel@0 352 ,<DT><A NAME=d:cmapx_np HREF=#a:cmapx_np><STRONG>cmapx_np</STRONG></A>
Daniel@0 353 <DD>These are identical to the imap and cmapx formats, except they
Daniel@0 354 rely solely on rectangles as active areas.
Daniel@0 355
Daniel@0 356 <DT><A NAME=d:ismap HREF=#a:ismap><STRONG>ismap</STRONG></A>
Daniel@0 357 <DD>Produces HTML image map files. This is a predecessor (circa 1994)
Daniel@0 358 of the IMAP format. Most servers now use the latter.
Daniel@0 359 <A HREF=attrs.html#d:URL>URLs</A> can be attached to the root graph,
Daniel@0 360 nodes and edges. Since edge
Daniel@0 361 links are attached to edge labels, an edge must
Daniel@0 362 have a <A HREF=attrs.html#d:label>label</A> for its
Daniel@0 363 URL to be used. For both nodes and edges, if the URL has the escape
Daniel@0 364 sequence "\N" embedded in its string, this will be replaced with the
Daniel@0 365 node or edge name.
Daniel@0 366
Daniel@0 367 <DT><A NAME=d:jpg HREF=#a:jpg><STRONG>jpg</STRONG></A>
Daniel@0 368 ,<DT><A NAME=d:jpeg HREF=#a:jpeg><STRONG>jpeg</STRONG></A>
Daniel@0 369 ,<DT><A NAME=d:jpe HREF=#a:jpe><STRONG>jpe</STRONG></A>
Daniel@0 370 <DD>Output JPEG compressed image files.
Daniel@0 371
Daniel@0 372 <DT><A NAME=d:mif HREF=#a:mif><STRONG>mif</STRONG></A>
Daniel@0 373 <DD>Generates Frame Maker MIF files.
Daniel@0 374
Daniel@0 375 <DT><A NAME=d:mp HREF=#a:mp><STRONG>mp</STRONG></A>
Daniel@0 376 <DD>Produces <A HREF="http://cm.bell-labs.com/who/hobby/MetaPost.html">MetaPost</A> output.
Daniel@0 377
Daniel@0 378 <DT><A NAME=d:pcl HREF=#a:pcl><STRONG>pcl</STRONG></A>
Daniel@0 379 <DD>Produces output in the PCL printer language.
Daniel@0 380 <A HREF=#d:hpgl>HP-GL</A> is a subset of
Daniel@0 381 PCL, so that PCL output is the same as HP-GL, wrapped with some initial
Daniel@0 382 and final commands to set the printer to and from HP-GL mode.
Daniel@0 383
Daniel@0 384 <DT><A NAME=d:pdf HREF=#a:pdf><STRONG>pdf</STRONG></A>
Daniel@0 385 <DD>Produces <A HREF="http://www.adobe.com/devnet/pdf/">PDF</A> output.
Daniel@0 386 (This option assumes Graphviz includes the Cairo renderer.)
Daniel@0 387 Alternatively, one can use the <A HREF="#d:ps2">ps2</A> option to
Daniel@0 388 produce PDF-compatible PostScript, and then use a ps-to-pdf converter.
Daniel@0 389 <P>
Daniel@0 390 Note: At present, this option does not support anchors, etc. To get these
Daniel@0 391 included in your PDF output, use <A HREF="#d:ps2">ps2</A>.
Daniel@0 392
Daniel@0 393 <DT><A NAME=d:pic HREF=#a:pic><STRONG>pic</STRONG></A>
Daniel@0 394 <DD>Outputs in PIC, the picture description language in the troff-family
Daniel@0 395
Daniel@0 396 <DT><A NAME=d:plain HREF=#a:plain><STRONG>plain</STRONG></A>
Daniel@0 397 ,<DT><A NAME=d:plain-ext HREF=#a:plain-ext><STRONG>plain-ext</STRONG></A>
Daniel@0 398 <DD>The plain and plain-ext formats produce output using
Daniel@0 399 a simple, line-based language.
Daniel@0 400 The latter format differs in that, on edges, it provides port names
Daniel@0 401 on head and tail nodes when applicable.
Daniel@0 402 <P>
Daniel@0 403 There are four types of statements.
Daniel@0 404 <PRE>
Daniel@0 405 <STRONG>graph</STRONG> <I>scale</I> <I>width</I> <I>height</I>
Daniel@0 406 <STRONG>node</STRONG> <I>name</I> <I>x</I> <I>y</I> <I>width</I> <I>height</I> <I>label</I> <I>style</I> <I>shape</I> <I>color</I> <I>fillcolor</I>
Daniel@0 407 <STRONG>edge</STRONG> <I>tail</I> <I>head</I> <I>n</I> <I>x<sub>1</sub></I> <I>y<sub>1</sub></I> .. <I>x<sub>n</sub></I> <I>y<sub>n</sub></I> [<I>label</I> <I>xl</I> <I>yl</I>] <I>style</I> <I>color</I>
Daniel@0 408 <STRONG>stop</STRONG>
Daniel@0 409 </PRE>
Daniel@0 410 <DL>
Daniel@0 411 <DT><STRONG>graph</STRONG>
Daniel@0 412 <DD>The <I>width</I> and <I>height</I> values give the width and height
Daniel@0 413 of the drawing. The lower left corner of the drawing is at the origin.
Daniel@0 414 The <I>scale</I> value indicates how the drawing should be scaled
Daniel@0 415 if a <A HREF=attrs.html#d:size>size</A> attribute was given and the drawing
Daniel@0 416 needs to be scaled to conform to that size. If no scaling is necessary,
Daniel@0 417 it will be set to 1.0. Note that all graph, node and edge
Daniel@0 418 coordinates and lengths are given unscaled.
Daniel@0 419 <DT><STRONG>node</STRONG>
Daniel@0 420 <DD>The <I>name</I> value is the name of the node, and <I>x</I> and <I>y</I>
Daniel@0 421 give the node's position. The <I>width</I> and <I>height</I> are the
Daniel@0 422 width and height of the node.
Daniel@0 423 The <I>label</I>,
Daniel@0 424 <I>style</I>, <I>shape</I>, <I>color</I> and <I>fillcolor</I> give the
Daniel@0 425 node's <A HREF=attrs.html#d:label>label</A>,
Daniel@0 426 <A HREF=attrs.html#d:style>style</A>, <A HREF=attrs.html#d:shape>shape</A>,
Daniel@0 427 <A HREF=attrs.html#d:color>color</A> and
Daniel@0 428 <A HREF=attrs.html#d:fillcolor>fillcolor</A>,
Daniel@0 429 respectively, using attribute default values where necessary. If the
Daniel@0 430 node does not have a style attribute, "solid" is used.
Daniel@0 431 <DT><STRONG>edge</STRONG>
Daniel@0 432 <DD>The <I>tail</I> and <I>head</I> values give the names of the head and
Daniel@0 433 tail nodes. In plain-ext format, the head or tail name will be appended
Daniel@0 434 with a colon and a portname if the edge connects to the node at a port.
Daniel@0 435 <I>n</I> is the number of control points defining the
Daniel@0 436 B-spline forming the edge. This is followed by 2*<I>n</I> numbers giving
Daniel@0 437 the x and y coordinates of the control points in order from tail to head.
Daniel@0 438 If the edge has a <A HREF=attrs.html#d:label>label</A>, this comes next
Daniel@0 439 followed by the x and y coordinates of the label's position.
Daniel@0 440 The edge description is completed by the edge's
Daniel@0 441 <A HREF=attrs.html#d:style>style</A> and <A HREF=attrs.html#d:color>color</A>.
Daniel@0 442 As with nodes, if a style is not defined, "solid" is used.
Daniel@0 443 <P>
Daniel@0 444 <B>Note:</B> The control points given in an edge statement define the
Daniel@0 445 body of the edge. In particular, if the edge has an arrowhead to the
Daniel@0 446 head or tail node,
Daniel@0 447 there will be a gap between the last or first control points and the
Daniel@0 448 boundary of the associated node. There are at least 3 possible ways
Daniel@0 449 of handling this gap:
Daniel@0 450 <UL>
Daniel@0 451 <LI> Arrange that the input graph uses <TT>dir=none</TT>,
Daniel@0 452 <TT>arrowhead=none</TT>, or <TT>arrowtail=none</TT> for all edges.
Daniel@0 453 In this case, the terminating control points will always touch the node.
Daniel@0 454 <LI> Consider the line segment joining the control point and the center
Daniel@0 455 of the node, and determine the point where the segment intersects the
Daniel@0 456 node's boundary. Then use the control point and the intersection point
Daniel@0 457 as the main axis of an arrowhead. The problem with this approach is
Daniel@0 458 that, if the edge has a port, the edge will not be pointing to the
Daniel@0 459 center of the node. In this case, rather than use the control point
Daniel@0 460 and center point, one can use the control point and its tangent.
Daniel@0 461 <LI> Arrange that the input graph uses <TT>headclip=false</TT> or
Daniel@0 462 <TT>tailclip=false</TT>. In this case, the edge will terminate at
Daniel@0 463 the node's center rather than its boundary. If arrowheads are used,
Daniel@0 464 there will still be a gap, but normally this will occur within the
Daniel@0 465 node. The application will still need to clip the spline to the node
Daniel@0 466 boundary. Also, as with the previous item, if the edge points to
Daniel@0 467 a node port, this technique will fail.
Daniel@0 468 </UL>
Daniel@0 469 </DL>
Daniel@0 470 The output consists of one <STRONG>graph</STRONG> line, a sequence of
Daniel@0 471 <STRONG>node</STRONG> lines, one per node, a sequence of
Daniel@0 472 <STRONG>edge</STRONG> lines, one per edge, and a final <STRONG>stop</STRONG>
Daniel@0 473 line. All units are in inches, represented by a floating point number.
Daniel@0 474 <P>
Daniel@0 475 Note that the plain formats provide minimal information, really giving not
Daniel@0 476 much more than node positions and sizes, and edge spline control points.
Daniel@0 477 These formats are usually most useful to applications wanting just this
Daniel@0 478 geometric information, and willing to fill in all of the graphical details.
Daniel@0 479 The only real advantages to these formats is their terseness and their
Daniel@0 480 ease of parsing. In general, the <A HREF=#d:dot>dot</A> and
Daniel@0 481 <A HREF=#d:xdot>xdot</A> are preferable in terms of the quantity of
Daniel@0 482 information provided.
Daniel@0 483
Daniel@0 484 <DT><A NAME=d:png HREF=#a:png><STRONG>png</STRONG></A>
Daniel@0 485 <DD>Produces output in the PNG (Portable Network Graphics) format.
Daniel@0 486
Daniel@0 487 <DT><A NAME=d:ps HREF=#a:ps><STRONG>ps</STRONG></A>
Daniel@0 488 <DD>Produces PostScript output.
Daniel@0 489 <P>
Daniel@0 490 Note: The default PostScript renderer can only handle the Latin-1
Daniel@0 491 character set. To get non-Latin-1 characters into PostScript output,
Daniel@0 492 use <TT>-Tps:cairo</TT>, assuming your version was built with the
Daniel@0 493 Cairo renderer.
Daniel@0 494
Daniel@0 495 <DT><A NAME=d:ps2 HREF=#a:ps2><STRONG>ps2</STRONG></A>
Daniel@0 496 <DD>Produces PostScript output with PDF notations. It is assumed the output
Daniel@0 497 will be directly converted into PDF format. The notations include PDF
Daniel@0 498 bounding box information, so that the resulting PDF file can be correctly
Daniel@0 499 used with pdf tools, such as <STRONG>pdflatex</STRONG>.
Daniel@0 500 In addition, if a node has a URL
Daniel@0 501 attribute, this gets translated into PDF code such that the node,
Daniel@0 502 when viewed in a PDF-viewer, e.g.,
Daniel@0 503 <STRONG>acroread</STRONG>,
Daniel@0 504 is a link to the given URL. If a URL is attached to the graph, this serves
Daniel@0 505 as a base, such that relative URLs on nodes are derived from it.
Daniel@0 506
Daniel@0 507 <DT><A NAME=d:svg HREF=#a:svg><STRONG>svg</STRONG></A>
Daniel@0 508 ,<DT><A NAME=d:svgz HREF=#a:svgz><STRONG>svgz</STRONG></A>
Daniel@0 509 <DD>Produce <A HREF="http://www.adobe.com/svg/">SVG</A> output,
Daniel@0 510 the latter in compressed format.
Daniel@0 511 <P>
Daniel@0 512 See <A HREF=#ID>Note</A>.
Daniel@0 513
Daniel@0 514 <DT><A NAME=d:tga HREF=#a:tga><STRONG>tga</STRONG></A>
Daniel@0 515 <DD>Produces <A HREF="http://en.wikipedia.org/wiki/Truevision_TGA">Targa</A> output.
Daniel@0 516
Daniel@0 517 <DT><A NAME=d:tif HREF=#a:tif><STRONG>tif</STRONG></A>
Daniel@0 518 ,<DT><A NAME=d:tiff HREF=#a:tiff><STRONG>tiff</STRONG></A>
Daniel@0 519 <DD>Produces <A HREF="http://www.libtiff.org/">TIFF</A> output.
Daniel@0 520
Daniel@0 521 <DT><A NAME=d:vml HREF=#a:vml><STRONG>vml</STRONG></A>
Daniel@0 522 ,<DT><A NAME=d:vmlz HREF=#a:vmlz><STRONG>vmlz</STRONG></A>
Daniel@0 523 <DD>Produces <A HREF="http://www.w3.org/TR/NOTE-VML">VML</A> output,
Daniel@0 524 the latter in compressed format.
Daniel@0 525 <P>
Daniel@0 526 See <A HREF=#ID>Note</A>.
Daniel@0 527
Daniel@0 528 <DT><A NAME=d:vrml HREF=#a:vrml><STRONG>vrml</STRONG></A>
Daniel@0 529 <DD>Outputs graphs in the <A HREF="http://www.vrml.org/">VRML</A> format.
Daniel@0 530 To get a 3D embedding, nodes must have a <A HREF=attrs.html#d:z>z</A>
Daniel@0 531 attribute. These can either be supplied as part of the input graph, or
Daniel@0 532 be generated by neato provided <A HREF=attrs.html#d:dim>dim</A><TT>=3</TT>
Daniel@0 533 and at least one node has a <B>z</B> value.
Daniel@0 534 <P>
Daniel@0 535 Line segments are drawn as cylinders.
Daniel@0 536 In general, VRML output relies on having the PNG library to produce images
Daniel@0 537 used to texture-fill the node shapes. However, if
Daniel@0 538 <A HREF=attrs.html#d:shape>shape</A><TT>=point</TT>,
Daniel@0 539 a node is drawn as a 3D sphere.
Daniel@0 540
Daniel@0 541 <DT><A NAME=d:vtx HREF=#a:vtx><STRONG>vtx</STRONG></A>
Daniel@0 542 <DD>Generates graph diagrams in the format for
Daniel@0 543 <A HREF="http://www.bombshellstudios.com/samples/co/vt.html">Confluents's Visual Thought</A>.
Daniel@0 544
Daniel@0 545 <DT><A NAME=d:wbmp HREF=#a:wbmp><STRONG>wbmp</STRONG></A>
Daniel@0 546 <DD>Produces output in the Wireless BitMap (WBMP) format, optimized for
Daniel@0 547 mobile computing.
Daniel@0 548
Daniel@0 549 <DT><A NAME=d:xlib HREF=#a:xlib><STRONG>xlib</STRONG></A>
Daniel@0 550 <DD>Creates an <A HREF="http://en.wikipedia.org/wiki/Xlib">Xlib</A> window and displays the output there.
Daniel@0 551
Daniel@0 552 </DL>
Daniel@0 553 <HR>
Daniel@0 554 </BODY>
Daniel@0 555 </HTML>
Daniel@0 556 <H1 align=CENTER><A NAME=d:image_fmts>Image Formats</A></H1>
Daniel@0 557 <HR>
Daniel@0 558 The <A HREF=attrs.html#a:image>image</A> and <A HREF=attrs.html#a:shapefile>shapefile</A> attributes specify an image file to be included
Daniel@0 559 as part of the final diagram. Not all image formats can be read. In addition,
Daniel@0 560 even if read, not all image formats can necessarily be used in a given
Daniel@0 561 output format.
Daniel@0 562 <P>
Daniel@0 563 The graph below shows what image formats can be used in which output formats,
Daniel@0 564 and the required plugins. On the left are the supported image formats.
Daniel@0 565 On the right are the supported output formats.
Daniel@0 566 In the middle are the plugins: image loaders, renderers, drivers, arranged by
Daniel@0 567 plugin library.
Daniel@0 568 This presents the most general case. A given installation may not provide
Daniel@0 569 one of the plugins, in which case, that transformation is not possible.
Daniel@0 570 <BR>
Daniel@0 571 <IMG WIDTH="80%" SRC="plugins.png">
Daniel@0 572 <HR>
Daniel@0 573 <H2>Notes</H2>
Daniel@0 574 <OL TYPE="1">
Daniel@0 575 <LI>
Daniel@0 576 <A NAME=ID>In the formats: -Tcmap, -Tcmapx, -Tsvg, -Tvml, the output generates
Daniel@0 577 'id="node#"' properties for nodes, 'id="edge#"' properties for edges, and 'id="cluster#"' properties for clusters, with the '#' replaced by an internally assigned integer. These strings can be provided instead by an externally provided "id=xxx" attribute on the object.
Daniel@0 578 Normal "\N" "\E" "\G" substitutions are applied.
Daniel@0 579 Externally provided id values are not used internally, and it is the use's reponsibilty to ensure
Daniel@0 580 that they are sufficiently unique for their intended downstream use.
Daniel@0 581 Note, in particular, that "\E" is not a unique id for multiedges.
Daniel@0 582 </OL>