"Fossies" - the Fresh Open Source Software archive

Member "graphviz-2.38.0/doc/info/output.html" of archive graphviz-2.38.0.tar.gz:


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--
    This is a generated document.  Do not edit.
-->
<HTML VERSION="2.0">
<HEAD>
<TITLE>Output Formats</TITLE>
</HEAD>
<BODY BGCOLOR=white>
<A NAME="top"></A>
<H1 align=CENTER>Output Formats</H1>
<HR>
The output format is specified with the <STRONG>-T</STRONG><I>lang</I>
flag on the <A HREF=command.html>command line</A>, where <I>lang</I>
is one of the parameters listed below.
<P>
The formats actually available in a given Graphviz system depend on
how the system was built and the presence of additional libraries.
To see what formats <b>dot</b> supports, run <TT>dot -T?</TT>.
See the <A HREF=command.html#d:T> description of the -T</A>
flag for additional information.
<P>
Note that the internal coordinate system has the origin
in the lower left corner.
Thus, positions in the
<A HREF=#d:canon>canon</A>,
<A HREF=#d:dot>dot</A>,
<A HREF=#d:xdot>xdot</A>,
<A HREF=#d:plain>plain</A>, and
<A HREF=#d:plain-ext>plain-ext</A>
formats need to be interpreted in this manner.
<P>
<TABLE ALIGN=CENTER>
<TR><TH>Command-line<BR>parameter</TH><TH>Format</TH></TR>
 <TR><TD ALIGN=CENTER><A NAME=a:bmp HREF=#d:bmp>bmp</A>
</TD><TD>Windows Bitmap Format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:canon HREF=#d:canon>canon</A>
<BR><A NAME=a:dot HREF=#d:dot>dot</A>
<BR><A NAME=a:gv HREF=#d:gv>gv</A>
<BR><A NAME=a:xdot HREF=#d:xdot>xdot</A>
<BR><A NAME=a:xdot1.2 HREF=#d:xdot1.2>xdot1.2</A>
<BR><A NAME=a:xdot1.4 HREF=#d:xdot1.4>xdot1.4</A>
</TD><TD>DOT</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:cgimage HREF=#d:cgimage>cgimage</A>
</TD><TD>CGImage bitmap format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:cmap HREF=#d:cmap>cmap</A>
</TD><TD>Client-side imagemap (deprecated)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:eps HREF=#d:eps>eps</A>
</TD><TD>Encapsulated PostScript</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:exr HREF=#d:exr>exr</A>
</TD><TD>OpenEXR</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:fig HREF=#d:fig>fig</A>
</TD><TD>FIG</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:gd HREF=#d:gd>gd</A>
<BR><A NAME=a:gd2 HREF=#d:gd2>gd2</A>
</TD><TD>GD/GD2 formats</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:gif HREF=#d:gif>gif</A>
</TD><TD>GIF</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:gtk HREF=#d:gtk>gtk</A>
</TD><TD>GTK canvas</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:ico HREF=#d:ico>ico</A>
</TD><TD>Icon Image File Format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:imap HREF=#d:imap>imap</A>
<BR><A NAME=a:cmapx HREF=#d:cmapx>cmapx</A>
</TD><TD>Server-side and client-side imagemaps</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:imap_np HREF=#d:imap_np>imap_np</A>
<BR><A NAME=a:cmapx_np HREF=#d:cmapx_np>cmapx_np</A>
</TD><TD>Server-side and client-side imagemaps</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:ismap HREF=#d:ismap>ismap</A>
</TD><TD>Server-side imagemap (deprecated)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:jp2 HREF=#d:jp2>jp2</A>
</TD><TD>JPEG 2000</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:jpg HREF=#d:jpg>jpg</A>
<BR><A NAME=a:jpeg HREF=#d:jpeg>jpeg</A>
<BR><A NAME=a:jpe HREF=#d:jpe>jpe</A>
</TD><TD>JPEG</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:pct HREF=#d:pct>pct</A>
<BR><A NAME=a:pict HREF=#d:pict>pict</A>
</TD><TD>PICT</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:pdf HREF=#d:pdf>pdf</A>
</TD><TD>Portable Document Format (PDF)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:pic HREF=#d:pic>pic</A>
</TD><TD>Kernighan's PIC graphics language</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:plain HREF=#d:plain>plain</A>
<BR><A NAME=a:plain-ext HREF=#d:plain-ext>plain-ext</A>
</TD><TD>Simple text format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:png HREF=#d:png>png</A>
</TD><TD>Portable Network Graphics format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:pov HREF=#d:pov>pov</A>
</TD><TD>POV-Ray markup language (prototype)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:ps HREF=#d:ps>ps</A>
</TD><TD>PostScript</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:ps2 HREF=#d:ps2>ps2</A>
</TD><TD>PostScript for PDF</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:psd HREF=#d:psd>psd</A>
</TD><TD>PSD</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:sgi HREF=#d:sgi>sgi</A>
</TD><TD>SGI</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:svg HREF=#d:svg>svg</A>
<BR><A NAME=a:svgz HREF=#d:svgz>svgz</A>
</TD><TD>Scalable Vector Graphics</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:tga HREF=#d:tga>tga</A>
</TD><TD>Truevision TGA</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:tif HREF=#d:tif>tif</A>
<BR><A NAME=a:tiff HREF=#d:tiff>tiff</A>
</TD><TD>TIFF (Tag Image File Format)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:tk HREF=#d:tk>tk</A>
</TD><TD>TK graphics</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:vml HREF=#d:vml>vml</A>
<BR><A NAME=a:vmlz HREF=#d:vmlz>vmlz</A>
</TD><TD>Vector Markup Language (VML)</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:vrml HREF=#d:vrml>vrml</A>
</TD><TD>VRML</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:wbmp HREF=#d:wbmp>wbmp</A>
</TD><TD>Wireless BitMap format</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:webp HREF=#d:webp>webp</A>
</TD><TD>Image format for the Web</TD> </TR>
 <TR><TD ALIGN=CENTER><A NAME=a:xlib HREF=#d:xlib>xlib</A>
<BR><A NAME=a:x11 HREF=#d:x11>x11</A>
</TD><TD>Xlib canvas</TD> </TR>
</TABLE>
<HR>
<H2>Format Descriptions</H2>
<DL>
<DT><A NAME=d:bmp HREF=#a:bmp><STRONG>bmp</STRONG></A>
<DD>Outputs images in the Windows <A HREF="http://en.wikipedia.org/wiki/Bitmap">BMP</A> format.

<DT><A NAME=d:canon HREF=#a:canon><STRONG>canon</STRONG></A>
,<DT><A NAME=d:dot HREF=#a:dot><STRONG>dot</STRONG></A>
,<DT><A NAME=d:gv HREF=#a:gv><STRONG>gv</STRONG></A>
,<DT><A NAME=d:xdot HREF=#a:xdot><STRONG>xdot</STRONG></A>
,<DT><A NAME=d:xdot1.2 HREF=#a:xdot1.2><STRONG>xdot1.2</STRONG></A>
,<DT><A NAME=d:xdot1.4 HREF=#a:xdot1.4><STRONG>xdot1.4</STRONG></A>
<DD>These formats produce output in the
<A HREF=lang.html>dot language</A>.
Using <B>canon</B> produces a prettyprinted version of the input,
with no layout performed.
<P>
The <B>dot</B> 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 <A HREF=attrs.html#d:bb>bb</A> 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
<A HREF=attrs.html#d:lp>lp</A> attribute.
<P>
Each node gets <A HREF=attrs.html#d:pos>pos</A>,
<A HREF=attrs.html#d:width>width</A> and
<A HREF=attrs.html#d:height>height</A> attributes. If the node is a record,
the record rectangles are given in the
<A HREF=attrs.html#d:rects>rects</A> attribute.
If the node is a polygon and the
<A HREF=attrs.html#d:vertices>vertices</A> attribute is defined, this
attribute contains the vertices of the node.
<P>
Every edge is
assigned a <A HREF=attrs.html#d:pos>pos</A> attribute,
and if the edge has a label, the label position
is given in <A HREF=attrs.html#d:lp>lp</A>.
<P>
The <B>xdot</B> format extends the
<B>dot</B> format by providing much more detailed information about
how graph components are drawn. It relies on additional attributes
for nodes, edges and graphs.
<P>
The format is fluid; comments and
suggestions for better representations are welcome.
To allow for changes in the format, Graphviz attaches the attribute
<TT>xdotversion</TT> to the graph.
If the <TT>xdotversion</TT> attribute is set in the input graph, the renderer
will only output features supported by that version. Note that the formats <TT>xdot1.2</TT>
and <TT>xdot1.4</TT> are equivalent to setting <TT>xdotversion=1.2</TT> and <TT>xdotversion=1.4</TT>,
respectively.
<P>
Additional drawing attributes can appear on nodes, edges, clusters and 
on the graph itself. There are six new attributes: 
<SPACER TYPE=VERTICAL size=10>
<TABLE  border bgcolor=beige>
<TR><TD>_draw_<TD colspan=2>General drawing without labels
<TR><TD>_ldraw_<TD colspan=2>Label drawing
<TR><TD>_hdraw_<TD>Head arrowhead<TD>Edge only
<TR><TD>_tdraw_<TD>Tail arrowhead<TD>Edge only
<TR><TD>_hldraw_<TD>Head label<TD>Edge only
<TR><TD>_tldraw_<TD>Tail label<TD>Edge only
</TABLE>
<P>
For a given graph object, one will typically a draw directive before the
label directive. For example, for a node, one would first use the commands
in <B>_draw_</B> followed by the commands in <B>_ldraw_</B>.
<P>
The value of these attributes consists of the concatenation of some
(multi-)set of the following 13 rendering or attribute operations.
(The number is parentheses gives the xdot version when the operation
was added to the format. If no version number is given, the operation
was in the original specification.)
<SPACER TYPE=VERTICAL size=10>
<TABLE border bgcolor=beige>
<TR><TD>E x<sub>0</sub> y<sub>0</sub> w h
<TD>Filled ellipse ((x-x<sub>0</sub>)/w)<sup>2</sup> + ((y-y<sub>0</sub>)/h)<sup>2</sup> = 1
<TR><TD>e x<sub>0</sub> y<sub>0</sub> w h
<TD>Unfilled ellipse ((x-x<sub>0</sub>)/w)<sup>2</sup> + ((y-y<sub>0</sub>)/h)<sup>2</sup> = 1
<TR><TD>P n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
<TD>Filled polygon using the given n points
<TR><TD>p n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
<TD>Unfilled polygon using the given n points
<TR><TD>L n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
<TD>Polyline using the given n points
<TR><TD>B n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
<TD>B-spline using the given n control points
<TR><TD>b n x<sub>1</sub> y<sub>1</sub> ... x<sub>n</sub> y<sub>n</sub>
<TD>Filled B-spline using the given n control points (1.1)
<TR><TD>T x y j w n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Text drawn using the baseline point (x,y). The text consists of the
n bytes 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.
<TR><TD>t f
<TD>Set font characteristics. The integer f is the OR of BOLD=1, ITALIC=2, UNDERLINE=4, SUPERSCRIPT=8, SUBSCRIPT=16, (1.5) STRIKE-THROUGH=32 (1.6),
and OVERLINE=64 (1.7).
<TR><TD>C n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Set fill color. The color value consists of the
n bytes following '-'. (1.1)
<TR><TD>c n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Set pen color. The color value consists of the
n bytes following '-'. (1.1)
<TR><TD>F s n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Set font. The font size is s points. The font name consists of the
n bytes following '-'. (1.1)
<TR><TD>S n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Set style attribute. The style value consists of the
n bytes following '-'. The syntax of the value is the same as
specified for a <B>styleItem</B> in <A HREF=attrs.html#k:style>style</A>. (1.1)
<TR><TD>I x y w h n -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>n</sub></I>
<TD>Externally-specified image drawn in the box with lower left
corner (x,y) and upper right corner (x+w,y+h). The name of the image
consists of the n bytes following '-'. This is usually a bitmap
image. Note that the image size, even when converted from pixels to
points, might be different from the required size (w,h). It is
assumed the renderer will perform the necessary scaling. (1.2)
</TABLE>
<P>
Note that the filled figures (ellipses, polygons and B-Splines)
imply two operations: first, drawing the filled figure with the
current fill color; second, drawing an unfilled figure with the
current pen color, pen width and pen style.
<P>
Within the context of a single drawing attribute, e.g., <TT>_draw_</TT>, there is
an implicit state for the graphical attributes. That is, once a color, style, font, or
font characteristic is set, it remains valid for all relevant drawing operations
until the value is reset by another xdot cmd.
<P>
Style values which can be incorporated in the graphics model do not
appear in xdot output. In particular, the style values
<TT>filled</TT>, <TT>rounded</TT>, <TT>diagonals</TT>, and <TT>invis</TT>
will not appear. Indeed, if style contains <TT>invis</TT>, 
there will not be any xdot output at all.
<P>
With version 1.4 of xdot, color strings may now encode linear and radial gradients. Linear
gradients have the form <br>
&nbsp;&nbsp;&nbsp;&nbsp;'[' x<sub>0</sub> y<sub>0</sub> x<sub>1</sub> y<sub>1</sub> n [<I>color-stop</I>]<sup>+</sup> ']'<br>
where (x<sub>0</sub>,y<sub>0</sub>) and (x<sub>1</sub>,y<sub>1</sub>) define the starting and
ending points of the gradient line segment, and n gives the number of <I>color-stops</I>. Each
<I>color-stop</I> has the form<br>
&nbsp;&nbsp;&nbsp;&nbsp;v m -<I>b<sub>1</sub>b<sub>2</sub>...b<sub>m</sub></I><br>
where v is a number in the range [0,1] defining a position on the gradient line segment, with
color specified by the m byte string <I>b<sub>1</sub>b<sub>2</sub>...b<sub>m</sub></I>, 
the same format as used for colors in the 'c' and 'C' operations.
<P>
Radial gradients have the form<br>
&nbsp;&nbsp;&nbsp;&nbsp;'(' x<sub>0</sub> y<sub>0</sub> r<sub>0</sub> x<sub>1</sub> y<sub>1</sub> r<sub>1</sub> n [<I>color-stop</I>]<sup>+</sup> ')' <br>
where x<sub><i>j</i></sub> y<sub><i>j</i></sub> r<sub><i>j</i></sub>, for <i>j</i>=0,1, specify
the center and radius of the start and ending circle, and n gives the number of <I>color-stops</I>.
A <I>color-stop</I> has the same format as defined for linear gradients, again given the fractional
offset and its associated color. 
<P>
In handling text alignment, the application may want to recompute the
string width using its own rendering primitives.
<P>
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 <A HREF=attrs.html#d:decorate>decorate</A>
attribute is set on an edge, its label
attribute will also contain a polyline operation.
In addition, if a label is a complex, HTML-like label, it will also
contain non-text operations.
<P>
All coordinates and sizes are in points.
Note though that if
an edge or node is invisible, no drawing operations are attached to it.
<P>
Version info:
<TABLE  border="1" >
<TR><TH>Xdot version</TH><TH>Graphviz version</TH><TH>Modification</TH></TR>
<TR><TD>1.0</TD> <TD>1.9</TD><TD> </TD></TR>
<TR><TD>1.1</TD> <TD>2.8</TD><TD>First plug-in version</TD></TR>
<TR><TD>1.2</TD><TD>2.13</TD><TD>Support image operator <b>I</b></TD></TR>
<TR><TD>1.3</TD><TD>2.31</TD><TD>Add numerical precision</TD</TR>
<TR><TD>1.4</TD><TD>2.32</TD><TD>Add gradient colors</TD</TR>
<TR><TD>1.5</TD><TD>2.34</TD><TD>Fix text layout problem; fix inverted vector in gradient; support version-specific output; new <B>t</B> op for text characteristics</TD</TR>
<TR><TD>1.6</TD><TD>2.35</TD><TD>Add STRIKE-THROUGH bit for <tt>t</tt></TD</TR>
<TR><TD>1.7</TD><TD>2.37</TD><TD>Add OVERLINE for <tt>t</tt></TD</TR>
</TABLE>

<DT><A NAME=d:cgimage HREF=#a:cgimage><STRONG>cgimage</STRONG></A>
<DD>Output using the <A HREF="https://developer.apple.com/library/mac/documentation/graphicsimaging/reference/CGImage/Reference/reference.html">CGImage format</A>.

<DT><A NAME=d:cmap HREF=#a:cmap><STRONG>cmap</STRONG></A>
<DD>Produces map files for client-side image maps. The cmap format is
mostly identical to cmapx, but the latter is well-formed XML amenable
to processing by XML tools. In particular, the cmapx output is wrapped in
&lt;map&gt;&lt;/map&gt;.
<P>
See <A HREF=#ID>Note</A>.

<DT><A NAME=d:eps HREF=#a:eps><STRONG>eps</STRONG></A>
<DD>Produces Encapsulated PostScript output.
At present, this is only guaranteed to be correct for a single
input graph since the Bounding Box information has to appear
at the beginning of the output, and this will be based on the first graph.

<DT><A NAME=d:exr HREF=#a:exr><STRONG>exr</STRONG></A>
<DD>Output in the OpenEXR format

<DT><A NAME=d:fig HREF=#a:fig><STRONG>fig</STRONG></A>
<DD>Outputs graphs in the FIG graphics language.

<DT><A NAME=d:gd HREF=#a:gd><STRONG>gd</STRONG></A>
,<DT><A NAME=d:gd2 HREF=#a:gd2><STRONG>gd2</STRONG></A>
<DD>Output images in the GD and GD2 format. These are the internal
formats used by the gd library. The latter is compressed.

<DT><A NAME=d:gif HREF=#a:gif><STRONG>gif</STRONG></A>
<DD>Outputs GIF bitmap images.

<DT><A NAME=d:gtk HREF=#a:gtk><STRONG>gtk</STRONG></A>
<DD>Creates a <A HREF="http://www.gtk.org/">GTK</A> window and displays the output there.

<DT><A NAME=d:ico HREF=#a:ico><STRONG>ico</STRONG></A>
<DD>Outputs images in the Windows <A HREF="http://en.wikipedia.org/wiki/ICO_(icon_image_file_format)">ICO format</A>.

<DT><A NAME=d:imap HREF=#a:imap><STRONG>imap</STRONG></A>
,<DT><A NAME=d:cmapx HREF=#a:cmapx><STRONG>cmapx</STRONG></A>
<DD>Produces map files for server-side and client-side image maps.
These can be used in a web page with
a graphical form of the output, e.g. in JPEG, GIF or PNG format, to attach
links to nodes and edges. 
Graphviz generates an object's map information only if the object has a non-trival 
<A HREF=attrs.html#d:URL>URL</A> or <A HREF=attrs.html#d:href>href</A>
attribute, or if it has an explicit <A HREF=attrs.html#d:tooltip>tooltip</A> attribute.
<P>
For example, to create a server-side map
given the dot file
<PRE>
/* x.gv */
digraph mainmap {
  URL="http://www.research.att.com/base.html";
  command [URL="http://www.research.att.com/command.html"];
  command -> output [URL="colors.html"];
}
</PRE>
one would process the graph and generate two output files:
<PRE>
dot -Timap -ox.map -Tgif -ox.gif x.gv
</PRE>
and then refer to it in a web page:
<XMP>
<A HREF="x.map"><IMG SRC="x.gif" ismap="ismap" /></A>
</XMP>
For client-side maps, one again generates two output files:
<PRE>
dot -Tcmapx -ox.map -Tgif -ox.gif x.gv
</PRE>
and uses the HTML
<XMP>
<IMG SRC="x.gif" USEMAP="#mainmap" />
... [content of x.map] ...
</XMP>
Note that the name given in the USEMAP attribute must be the same
as the ID attribute of the MAP element. The Graphviz renderer
uses the name of the graph as the ID. Thus, in the example above,
where the graph's name is <T>mainmap</T>, we have <T>USEMAP="#mainmap"</T>
in the IMG attribute, and x.map will look like
<XMP>
<map id="mainmap" name="mainmap">
... 
</map>
</XMP>
<P>
<A HREF=attrs.html#d:URL>URLs</A> can be attached to the root
graph, nodes and edges. If a node has a URL, clicking in the node
will activate the link.
If an edge has a URL, various
points along the edge (but not necessarily the head or tail)
will link to it. In addition, if the edge has a
<A HREF=attrs.html#d:label>label</A>, that will link
to the URL.
As for the head of the edge, this is linked to the
<A HREF=attrs.html#d:headURL>headURL</A>, if set.
Otherwise, it is linked to the edge's URL if that is defined.
The analogous description holds for the tail and the
<A HREF=attrs.html#d:tailURL>tailURL</A>.
A URL associated with the graph is used as a default link.
<P>
If the URL
of a node contains the escape sequence "&#92;N", it will be replaced by
the node's name.
If the headURL is defined and contains the escape sequence "&#92;N",
it will be replaced by
the <A HREF=attrs.html#d:headlabel>headlabel</A>, if defined.
The analogous result holds for the tailURL and the
<A HREF=attrs.html#d:taillabel>taillabel</A>.
<P>
See <A HREF=#ID>Note</A>.

<DT><A NAME=d:imap_np HREF=#a:imap_np><STRONG>imap_np</STRONG></A>
,<DT><A NAME=d:cmapx_np HREF=#a:cmapx_np><STRONG>cmapx_np</STRONG></A>
<DD>These are identical to the imap and cmapx formats, except they
rely solely on rectangles as active areas.

<DT><A NAME=d:ismap HREF=#a:ismap><STRONG>ismap</STRONG></A>
<DD>Produces HTML image map files. This is a predecessor (circa 1994)
of the IMAP format.  Most servers now use the latter.
<A HREF=attrs.html#d:URL>URLs</A> can be attached to the root graph,
nodes and edges. Since edge
links are attached to edge labels, an edge must
have a <A HREF=attrs.html#d:label>label</A> for its
URL to be used. For both nodes and edges, if the URL has the escape
sequence "&#92;N" embedded in its string, this will be replaced with the
node or edge name.

<DT><A NAME=d:jp2 HREF=#a:jp2><STRONG>jp2</STRONG></A>
<DD>Output using the <A HREF="http://www.jpeg.org/jpeg2000/">JPEG 2000</A> format.

<DT><A NAME=d:jpg HREF=#a:jpg><STRONG>jpg</STRONG></A>
,<DT><A NAME=d:jpeg HREF=#a:jpeg><STRONG>jpeg</STRONG></A>
,<DT><A NAME=d:jpe HREF=#a:jpe><STRONG>jpe</STRONG></A>
<DD>Output JPEG compressed image files.

<DT><A NAME=d:pct HREF=#a:pct><STRONG>pct</STRONG></A>
,<DT><A NAME=d:pict HREF=#a:pict><STRONG>pict</STRONG></A>
<DD>Output in the Apple PICT file format.

<DT><A NAME=d:pdf HREF=#a:pdf><STRONG>pdf</STRONG></A>
<DD>Produces <A HREF="http://www.adobe.com/devnet/pdf/">PDF</A> output.
(This option assumes Graphviz includes the Cairo renderer.)
Alternatively, one can use the <A HREF="#d:ps2">ps2</A> option to
produce PDF-compatible PostScript, and then use a ps-to-pdf converter.
<P>
Note: At present, this option does not support anchors, etc. To get these
included in your PDF output, use <A HREF="#d:ps2">ps2</A>.

<DT><A NAME=d:pic HREF=#a:pic><STRONG>pic</STRONG></A>
<DD>Output is given in the text-based PIC language developed for troff.
See <A HREF="https://en.wikipedia.org/wiki/Pic_language">Pic language</A>.

<DT><A NAME=d:plain HREF=#a:plain><STRONG>plain</STRONG></A>
,<DT><A NAME=d:plain-ext HREF=#a:plain-ext><STRONG>plain-ext</STRONG></A>
<DD>The plain and plain-ext formats produce output using
a simple, line-based language.
The latter format differs in that, on edges, it provides port names
on head and tail nodes when applicable.
<P>
There are four types of statements.
<PRE>
 <STRONG>graph</STRONG> <I>scale</I> <I>width</I> <I>height</I>
 <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>
 <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>
 <STRONG>stop</STRONG>
</PRE>
<DL>
<DT><STRONG>graph</STRONG>
<DD>The <I>width</I> and <I>height</I> values give the width and height
of the drawing. The lower left corner of the drawing is at the origin.
The <I>scale</I> value indicates how the drawing should be scaled
if a <A HREF=attrs.html#d:size>size</A> attribute was given and the drawing
needs to be scaled to conform to that size. If no scaling is necessary,
it will be set to 1.0. Note that all graph, node and edge
coordinates and lengths are given unscaled.
<DT><STRONG>node</STRONG>
<DD>The <I>name</I> value is the name of the node, and <I>x</I> and <I>y</I>
give the node's position. The <I>width</I> and <I>height</I> are the
width and height of the node.
The <I>label</I>,
<I>style</I>, <I>shape</I>, <I>color</I> and <I>fillcolor</I> give the
node's <A HREF=attrs.html#d:label>label</A>,
<A HREF=attrs.html#d:style>style</A>, <A HREF=attrs.html#d:shape>shape</A>,
<A HREF=attrs.html#d:color>color</A> and
<A HREF=attrs.html#d:fillcolor>fillcolor</A>,
respectively, using attribute default values where necessary. If the
node does not have a style attribute, "solid" is used.
<DT><STRONG>edge</STRONG>
<DD>The <I>tail</I> and <I>head</I> values give the names of the head and
tail nodes. In plain-ext format, the head or tail name will be appended
with a colon and a portname if the edge connects to the node at a port.
<I>n</I> is the number of control points defining the
B-spline forming the edge. This is followed by 2*<I>n</I> numbers giving
the x and y coordinates of the control points in order from tail to head.
If the edge has a <A HREF=attrs.html#d:label>label</A>, this comes next
followed by the x and y coordinates of the label's position.
The edge description is completed by the edge's
<A HREF=attrs.html#d:style>style</A> and <A HREF=attrs.html#d:color>color</A>.
As with nodes, if a style is not defined, "solid" is used.
<P>
<B>Note:</B> The control points given in an edge statement define the
body of the edge. In particular, if the edge has an arrowhead to the
head or tail node,
there will be a gap between the last or first control points and the
boundary of the associated node. There are at least 3 possible ways
of handling this gap:
<UL>
<LI> Arrange that the input graph uses <TT>dir=none</TT>,
<TT>arrowhead=none</TT>, or <TT>arrowtail=none</TT> for all edges.
In this case, the terminating control points will always touch the node.
<LI> Consider the line segment joining the control point and the center
of the node, and determine the point where the segment intersects the
node's boundary. Then use the control point and the intersection point
as the main axis of an arrowhead. The problem with this approach is
that, if the edge has a port, the edge will not be pointing to the
center of the node. In this case, rather than use the control point
and center point, one can use the control point and its tangent.
<LI> Arrange that the input graph uses <TT>headclip=false</TT> or
<TT>tailclip=false</TT>. In this case, the edge will terminate at
the node's center rather than its boundary. If arrowheads are used,
there will still be a gap, but normally this will occur within the
node. The application will still need to clip the spline to the node
boundary. Also, as with the previous item, if the edge points to
a node port, this technique will fail.
</UL>
</DL>
The output consists of one <STRONG>graph</STRONG> line, a sequence of
<STRONG>node</STRONG> lines, one per node, a sequence of
<STRONG>edge</STRONG> lines, one per edge, and a final <STRONG>stop</STRONG>
line. All units are in inches, represented by a floating point number.
<P>
Note that the plain formats provide minimal information, really giving not
much more than node positions and sizes, and edge spline control points.
These formats are usually most useful to applications wanting just this
geometric information, and willing to fill in all of the graphical details.
The only real advantages to these formats is their terseness and their
ease of parsing. In general, the <A HREF=#d:dot>dot</A> and
<A HREF=#d:xdot>xdot</A> are preferable in terms of the quantity of
information provided.

<DT><A NAME=d:png HREF=#a:png><STRONG>png</STRONG></A>
<DD>Produces output in the PNG (Portable Network Graphics) format.

<DT><A NAME=d:pov HREF=#a:pov><STRONG>pov</STRONG></A>
<DD>Scene-description language for 3D modelling for the 
<A HREF="http://www.povray.org/">Persistence of Vision Raytracer</A>.

<DT><A NAME=d:ps HREF=#a:ps><STRONG>ps</STRONG></A>
<DD>Produces PostScript output.
<P>
Note: The default PostScript renderer can only handle the Latin-1
character set. To get non-Latin-1 characters into PostScript output,
use <TT>-Tps:cairo</TT>, assuming your version was built with the
Cairo renderer.

<DT><A NAME=d:ps2 HREF=#a:ps2><STRONG>ps2</STRONG></A>
<DD>Produces PostScript output with PDF notations. It is assumed the output
will be directly converted into PDF format. The notations include PDF
bounding box information, so that the resulting PDF file can be correctly
used with pdf tools, such as <STRONG>pdflatex</STRONG>.
In addition, if a node has a URL
attribute, this gets translated into PDF code such that the node,
when viewed in a PDF-viewer, e.g.,
<STRONG>acroread</STRONG>,
is a link to the given URL. If a URL is attached to the graph, this serves
as a base, such that relative URLs on nodes are derived from it.

<DT><A NAME=d:psd HREF=#a:psd><STRONG>psd</STRONG></A>
<DD>Output in the Adobe PhotoShop PSD file format.

<DT><A NAME=d:sgi HREF=#a:sgi><STRONG>sgi</STRONG></A>
<DD>Output in the SGI image file format.

<DT><A NAME=d:svg HREF=#a:svg><STRONG>svg</STRONG></A>
,<DT><A NAME=d:svgz HREF=#a:svgz><STRONG>svgz</STRONG></A>
<DD>Produce <A HREF="http://www.adobe.com/svg/">SVG</A> output,
the latter in compressed format.
<P>
See <A HREF=#ID>Note</A>.

<DT><A NAME=d:tga HREF=#a:tga><STRONG>tga</STRONG></A>
<DD>Output in the Truevision TGA or TARGA format.

<DT><A NAME=d:tif HREF=#a:tif><STRONG>tif</STRONG></A>
,<DT><A NAME=d:tiff HREF=#a:tiff><STRONG>tiff</STRONG></A>
<DD>Produces <A HREF="http://www.libtiff.org/">TIFF</A> output.

<DT><A NAME=d:tk HREF=#a:tk><STRONG>tk</STRONG></A>
<DD>Output using the text-based TK graphics primitives.

<DT><A NAME=d:vml HREF=#a:vml><STRONG>vml</STRONG></A>
,<DT><A NAME=d:vmlz HREF=#a:vmlz><STRONG>vmlz</STRONG></A>
<DD>Produces <A HREF="http://www.w3.org/TR/NOTE-VML">VML</A> output,
the latter in compressed format.
<P>
See <A HREF=#ID>Note</A>.

<DT><A NAME=d:vrml HREF=#a:vrml><STRONG>vrml</STRONG></A>
<DD>Outputs graphs in the <A HREF="http://www.vrml.org/">VRML</A> format.
To get a 3D embedding, nodes must have a <A HREF=attrs.html#d:z>z</A>
attribute. These can either be supplied as part of the input graph, or
be generated by neato provided <A HREF=attrs.html#d:dim>dim</A><TT>=3</TT>
and at least one node has a <B>z</B> value.
<P>
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
<A HREF=attrs.html#d:shape>shape</A><TT>=point</TT>,
a node is drawn as a 3D sphere.

<DT><A NAME=d:wbmp HREF=#a:wbmp><STRONG>wbmp</STRONG></A>
<DD>Produces output in the Wireless BitMap (WBMP) format, optimized for
mobile computing.

<DT><A NAME=d:webp HREF=#a:webp><STRONG>webp</STRONG></A>
<DD>Produces output in the image format for the Web (WEBP) format, optimized for
web devices such as tablets.
See Wikipedia's <a href="http://en.wikipedia.org/wiki/Webp">WebP</a>
or Google's <a href="http://code.google.com/speed/webp/">webp</a> pages.

<DT><A NAME=d:xlib HREF=#a:xlib><STRONG>xlib</STRONG></A>
,<DT><A NAME=d:x11 HREF=#a:x11><STRONG>x11</STRONG></A>
<DD>Creates an <A HREF="http://en.wikipedia.org/wiki/Xlib">Xlib</A> window and displays the output there.

</DL>
<HR>
<H1 align=CENTER><A NAME=d:image_fmts>Image Formats</A></H1>
<HR>
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
as part of the final diagram. Not all image formats can be read. In addition,
even if read, not all image formats can necessarily be used in a given
output format.
<P>
The graph below shows what image formats can be used in which output formats,
and the required plugins. On the left are the supported image formats. 
On the right are the supported output formats.
In the middle are the plugins: image loaders, renderers, drivers, arranged by 
plugin library.  
This presents the most general case. A given installation may not provide
one of the plugins, in which case, that transformation is not possible.
<BR>
<IMG WIDTH="80%" SRC="plugins.png">
<HR>
<H2>Notes</H2>
<OL TYPE="1">
<LI>
<A NAME=ID></A>In the formats: -Tcmap, -Tcmapx, -Tsvg, -Tvml, the output generates
'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.
Normal "&#92;N" "&#92;E" "&#92;G" substitutions are applied.
Externally provided id values are not used internally, and it is the use's reponsibilty to ensure
that they are sufficiently unique for their intended downstream use.
Note, in particular, that "&#92;E" is not a unique id for multiedges.
</OL>
</BODY>
</HTML>