comparison toolboxes/graph_visualisation/share/graphviz/doc/html/info/command.html @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <HTML VERSION="2.0">
3 <HEAD>
4 <TITLE>Command-line Usage</TITLE>
5 </HEAD>
6 <BODY BGCOLOR=white>
7 <A NAME="top"></A>
8 <H1 ALIGN=CENTER>Command-line Invocation</H1>
9 <HR>
10 All Graphviz programs have a similar invocation:<BR>
11 <TABLE><TR><TD>
12 <CODE><I>cmd</I> [ <I>flags</I> ] [ <I>input files</I> ]<CODE>
13 </TR></TABLE>
14 If no input files are supplied, the program reads from <STRONG>stdin</STRONG>.
15 <H3>Flags</H3>
16 <DL>
17 <DT><STRONG>-G</STRONG><I>name</I>[=<I>value</I>]
18 <DD>Set a graph attribute, with default <I>value</I> = <TT>true</TT>.
19 <DT><STRONG>-N</STRONG><I>name</I>[=<I>value</I>]
20 <DD>Set a default node attribute, with default <I>value</I> = <TT>true</TT>.
21 <DT><STRONG>-E</STRONG><I>name</I>[=<I>value</I>]
22 <DD>Set a default edge attribute, with default <I>value</I> = <TT>true</TT>.
23 <DT><A NAME=minusK><STRONG>-K</STRONG></A><I>layout</I>
24 <DD>Specifies which default layout algorithm to use, overriding the default from the command name. For example, running
25 <TT>dot -Kneato</TT> is equivalent to running <TT>neato</TT>.
26 <DT><A NAME=d:T><STRONG>-T</STRONG></A><I>format</I>[:<I>renderer</I>[:<I>formatter</I>]]
27 <DD>Set output language to one of the <A HREF=output.html>supported formats</A>.
28 By default, <A HREF=output.html#d:dot>attributed dot</A> is produced.
29 <P>
30 Depending on how Graphviz was built, there may be multiple renderers for
31 generating a particular output format, and multiple formatters for
32 creating the final output. For example, a typical installation
33 can produce <A HREF="http://www.graphviz.org/doc/info/output.html#d:png">PNG</A>
34 output using either the Cairo or GD library. The desired rendering engine
35 can be specified after a colon. If there are multiple formatting engines
36 available, the desired one can be specified in a similar fashion after
37 the rendering engine. Thus, <TT>-Tpng:cairo</TT> specifies PNG
38 output produced by Cairo (using the Cairo's default formatter), and
39 <TT>-Tpng:cairo:gd</TT> specifies PNG
40 output produced by Cairo formatted using the GD library.
41 <P>
42 If no renderer is specified, or a renderer but no formatter, the default one
43 is invoked. The flag <TT>-T<I>format</I>:</TT> produces a list of all
44 of the renderers available for the specified <I>format</I>, the first one
45 listed with a prefix matching <I>format</I> being the default.
46 Using the <TT>-v</TT> flag, described below, will print which format,
47 renderer, and formatter are actually used.
48 <DT><STRONG>-V</STRONG>
49 <DD>Emit version information and exit.
50 <DT><STRONG>-l</STRONG><I>library</I>
51 <DD>User-supplied, device-dependent library text. Multiple flags may
52 be given. These strings are passed to the code generator at the
53 beginning of output.
54 <P>For PostScript output, they are treated as file names
55 whose content will be included in the preamble after the standard preamble.
56 If <I>library</I> is the empty string <TT>""</TT>, the standard preamble
57 is not emitted.
58 <DT><A NAME=d:n><STRONG>-n</STRONG>[<I>num</I>]</A>
59 <DD>Sets no-op flag in <STRONG>neato</STRONG>.
60 If set, <STRONG>neato</STRONG> assumes nodes have already been
61 positioned and all nodes have a <A HREF=attrs.html#d:pos>pos</A>
62 attribute giving
63 the positions. It then performs an optional adjustment to remove node-node
64 overlap, depending on the value of the
65 <A HREF=attrs.html#d:overlap>overlap</A> attribute, computes the edge
66 layouts, depending on the value of the
67 <A HREF=attrs.html#d:splines>splines</A> attribute, and
68 emits the graph in the appropriate format. If <I>num</I> is supplied,
69 the following actions occur:
70 <DL>
71 <DT><I>num</I> = 1
72 <DD>Equivalent to <STRONG>-n</STRONG>.
73 <DT><I>num</I> > 1
74 <DD>Use node positions as specified, with no adjustment to
75 remove node-node overlaps, and use any edge layouts already specified
76 by the <A HREF=attrs.html#d:pos>pos</A> attribute. <STRONG>neato</STRONG>
77 computes an edge layout for any edge that does not have a <B>pos</B> attribute.
78 As usual, edge layout is guided by the
79 <A HREF=attrs.html#d:splines>splines</A> attribute.
80 </DL>
81 <DT><STRONG>-o</STRONG><I>outfile</I>
82 <DD>Write output to file <I>outfile</I>. By default, output goes to
83 <STRONG>stdout</STRONG>.
84 <DT><STRONG>-O</STRONG>
85 <DD>Automatically generate output file names based on the input
86 file name and the various output formats specified by the <STRONG>-T</STRONG>
87 flags.
88 <DT><STRONG>-P</STRONG>
89 <DD>Automatically generate a graph that shows the plugin configuration of
90 the current executable. e.g. <STRONG>dot -P -Tps | lpr</STRONG>
91 <DT><STRONG>-q</STRONG>
92 <DD>Suppress warning messages.
93 <DT><A NAME=d:s><STRONG>-s</STRONG></A>[<I>scale</I>]
94 <DD>Set input scale to <I>scale</I>. If this value is omitted,
95 72.0 is used. This number is used to convert the point coordinate
96 units used in the <A HREF=attrs.html#d:pos>pos</A> attribute
97 into inches, which is what is expected by neato and fdp.
98 Thus, feeding the output of a graph laid out by one program into
99 neato or fdp almost always requires this flag.
100 Ignored if the <STRONG>-n</STRONG> flag is used.
101 <DT><STRONG>-v</STRONG>
102 <DD>Verbose mode
103 <DT><STRONG>-x</STRONG>
104 <DD>In <STRONG>neato</STRONG>, on input, prune isolated nodes and peninsulas.
105 This removes uninteresting graph structure and produces a less cluttered
106 drawing.
107 <DT><STRONG>-y</STRONG>
108 <DD>By default, the coordinate system used in generic output formats,
109 such as <A HREF=output.html#d:dot>attributed dot</A>,
110 <A HREF=output.html#d:xdot>extended dot</A>,
111 <A HREF=output.html#d:plain>plain</A> and
112 <A HREF=output.html#d:plain-ext>plain-ext</A>,
113 is the standard cartesian system with the origin in the lower left corner,
114 and with increasing y coordinates as points move from bottom to top.
115 If the <CODE>-y</CODE> flag is used, the coordinate system is inverted,
116 so that increasing values of y correspond to movement from top to bottom.
117 <DT><STRONG>-?</STRONG>
118 <DD>Print usage information, then exit.
119 </DL>
120 If multiple <STRONG>-T</STRONG> flags are given, drawings of the graph
121 are emitted in each of the specified formats. Multiple <STRONG>-o</STRONG>
122 flags can be used to specify the output file for each format. If there
123 are more formats than files, the remaining formats are written to
124 <STRONG>stdout</STRONG>.
125 <P>
126 Note that the <STRONG>-G</STRONG>,
127 <STRONG>-N</STRONG> and
128 <STRONG>-E</STRONG> flags override any initial attribute declarations
129 in the input graph,
130 i.e., those attribute statements appearing before any node, edge or
131 subgraph definitions.
132 In addition, these flags cause the related attributes to be permanently
133 attached to the graph. Thus, if attributed dot is used for
134 output, the graph will have these attributes.
135 <H3>Environment Variables</H3>
136 <DL>
137 <DT><STRONG>GDFONTPATH</STRONG>
138 <DD>
139 List of pathnames giving directories which a program should search for fonts.
140 Overridden by <A HREF=#d:DOTFONTPATH>DOTFONTPATH</A>.
141 <IT>Used only if Graphviz is not built with the <TT>fontconfig</TT> library</IT>
142 <DT><A NAME=d:DOTFONTPATH><STRONG>DOTFONTPATH</STRONG></A>
143 <DD>
144 List of pathnames giving directories which a program should search for fonts.
145 Overridden by <A HREF=attrs.html#d:fontpath><STRONG>fontpath</STRONG></A>.
146 <IT>Used only if Graphviz is not built with the <TT>fontconfig</TT> library</IT>
147 <DT><A NAME=d:SERVER_NAME><STRONG>SERVER_NAME</STRONG></A>
148 <DD>
149 If defined, this indicates that the software is running as a web application,
150 which restricts access to image files. See
151 <A HREF=d:GV_FILE_PATH>GV_FILE_PATH</A>.
152 <DT><A NAME=d:GV_FILE_PATH><STRONG>GV_FILE_PATH</STRONG></A>
153 <DD>
154 If <A HREF=d:SERVER_NAME>SERVER_NAME</A> is defined, image files are
155 restricted to the directory specified by <TT>GV_FILE_PATH</TT>.
156 Note that sometimes, when using one of the layout programs in a web
157 script, it is not enough to use an export command but rather the
158 variables should be set when the command is run, for example,<BR>
159 <CODE>
160 SERVER_NAME=xxx GV_FILE_PATH="images/" dot -Tpng -o x.png x.dot
161 </CODE>
162 <DT><A NAME=d:GVBINDIR><STRONG>GVBINDIR</STRONG></A>
163 <DD>
164 Indicates which directory contains the Graphviz config file and
165 plug-in libraries. If it is defined, the value overrides any other
166 mechanism for finding this directory. If Graphviz is properly installed,
167 it should not be needed, though it can be useful for relocation on
168 platforms not running Linux or Windows.
169 </DL>
170 </BODY>
171 </HTML>