wolffd@0: wolffd@0: wolffd@0: wolffd@0: Command-line Usage wolffd@0: wolffd@0: wolffd@0: wolffd@0:

Command-line Invocation

wolffd@0:
wolffd@0: All Graphviz programs have a similar invocation:
wolffd@0:
wolffd@0: cmd [ flags ] [ input files ] wolffd@0:
wolffd@0: If no input files are supplied, the program reads from stdin. wolffd@0:

Flags

wolffd@0:
wolffd@0:
-Gname[=value] wolffd@0:
Set a graph attribute, with default value = true. wolffd@0:
-Nname[=value] wolffd@0:
Set a default node attribute, with default value = true. wolffd@0:
-Ename[=value] wolffd@0:
Set a default edge attribute, with default value = true. wolffd@0:
-Klayout wolffd@0:
Specifies which default layout algorithm to use, overriding the default from the command name. For example, running wolffd@0: dot -Kneato is equivalent to running neato. wolffd@0:
-Tformat[:renderer[:formatter]] wolffd@0:
Set output language to one of the supported formats. wolffd@0: By default, attributed dot is produced. wolffd@0:

wolffd@0: Depending on how Graphviz was built, there may be multiple renderers for wolffd@0: generating a particular output format, and multiple formatters for wolffd@0: creating the final output. For example, a typical installation wolffd@0: can produce PNG wolffd@0: output using either the Cairo or GD library. The desired rendering engine wolffd@0: can be specified after a colon. If there are multiple formatting engines wolffd@0: available, the desired one can be specified in a similar fashion after wolffd@0: the rendering engine. Thus, -Tpng:cairo specifies PNG wolffd@0: output produced by Cairo (using the Cairo's default formatter), and wolffd@0: -Tpng:cairo:gd specifies PNG wolffd@0: output produced by Cairo formatted using the GD library. wolffd@0:

wolffd@0: If no renderer is specified, or a renderer but no formatter, the default one wolffd@0: is invoked. The flag -Tformat: produces a list of all wolffd@0: of the renderers available for the specified format, the first one wolffd@0: listed with a prefix matching format being the default. wolffd@0: Using the -v flag, described below, will print which format, wolffd@0: renderer, and formatter are actually used. wolffd@0:

-V wolffd@0:
Emit version information and exit. wolffd@0:
-llibrary wolffd@0:
User-supplied, device-dependent library text. Multiple flags may wolffd@0: be given. These strings are passed to the code generator at the wolffd@0: beginning of output. wolffd@0:

For PostScript output, they are treated as file names wolffd@0: whose content will be included in the preamble after the standard preamble. wolffd@0: If library is the empty string "", the standard preamble wolffd@0: is not emitted. wolffd@0:

-n[num] wolffd@0:
Sets no-op flag in neato. wolffd@0: If set, neato assumes nodes have already been wolffd@0: positioned and all nodes have a pos wolffd@0: attribute giving wolffd@0: the positions. It then performs an optional adjustment to remove node-node wolffd@0: overlap, depending on the value of the wolffd@0: overlap attribute, computes the edge wolffd@0: layouts, depending on the value of the wolffd@0: splines attribute, and wolffd@0: emits the graph in the appropriate format. If num is supplied, wolffd@0: the following actions occur: wolffd@0:
wolffd@0:
num = 1 wolffd@0:
Equivalent to -n. wolffd@0:
num > 1 wolffd@0:
Use node positions as specified, with no adjustment to wolffd@0: remove node-node overlaps, and use any edge layouts already specified wolffd@0: by the pos attribute. neato wolffd@0: computes an edge layout for any edge that does not have a pos attribute. wolffd@0: As usual, edge layout is guided by the wolffd@0: splines attribute. wolffd@0:
wolffd@0:
-ooutfile wolffd@0:
Write output to file outfile. By default, output goes to wolffd@0: stdout. wolffd@0:
-O wolffd@0:
Automatically generate output file names based on the input wolffd@0: file name and the various output formats specified by the -T wolffd@0: flags. wolffd@0:
-P wolffd@0:
Automatically generate a graph that shows the plugin configuration of wolffd@0: the current executable. e.g. dot -P -Tps | lpr wolffd@0:
-q wolffd@0:
Suppress warning messages. wolffd@0:
-s[scale] wolffd@0:
Set input scale to scale. If this value is omitted, wolffd@0: 72.0 is used. This number is used to convert the point coordinate wolffd@0: units used in the pos attribute wolffd@0: into inches, which is what is expected by neato and fdp. wolffd@0: Thus, feeding the output of a graph laid out by one program into wolffd@0: neato or fdp almost always requires this flag. wolffd@0: Ignored if the -n flag is used. wolffd@0:
-v wolffd@0:
Verbose mode wolffd@0:
-x wolffd@0:
In neato, on input, prune isolated nodes and peninsulas. wolffd@0: This removes uninteresting graph structure and produces a less cluttered wolffd@0: drawing. wolffd@0:
-y wolffd@0:
By default, the coordinate system used in generic output formats, wolffd@0: such as attributed dot, wolffd@0: extended dot, wolffd@0: plain and wolffd@0: plain-ext, wolffd@0: is the standard cartesian system with the origin in the lower left corner, wolffd@0: and with increasing y coordinates as points move from bottom to top. wolffd@0: If the -y flag is used, the coordinate system is inverted, wolffd@0: so that increasing values of y correspond to movement from top to bottom. wolffd@0:
-? wolffd@0:
Print usage information, then exit. wolffd@0:
wolffd@0: If multiple -T flags are given, drawings of the graph wolffd@0: are emitted in each of the specified formats. Multiple -o wolffd@0: flags can be used to specify the output file for each format. If there wolffd@0: are more formats than files, the remaining formats are written to wolffd@0: stdout. wolffd@0:

wolffd@0: Note that the -G, wolffd@0: -N and wolffd@0: -E flags override any initial attribute declarations wolffd@0: in the input graph, wolffd@0: i.e., those attribute statements appearing before any node, edge or wolffd@0: subgraph definitions. wolffd@0: In addition, these flags cause the related attributes to be permanently wolffd@0: attached to the graph. Thus, if attributed dot is used for wolffd@0: output, the graph will have these attributes. wolffd@0:

Environment Variables

wolffd@0:
wolffd@0:
GDFONTPATH wolffd@0:
wolffd@0: List of pathnames giving directories which a program should search for fonts. wolffd@0: Overridden by DOTFONTPATH. wolffd@0: Used only if Graphviz is not built with the fontconfig library wolffd@0:
DOTFONTPATH wolffd@0:
wolffd@0: List of pathnames giving directories which a program should search for fonts. wolffd@0: Overridden by fontpath. wolffd@0: Used only if Graphviz is not built with the fontconfig library wolffd@0:
SERVER_NAME wolffd@0:
wolffd@0: If defined, this indicates that the software is running as a web application, wolffd@0: which restricts access to image files. See wolffd@0: GV_FILE_PATH. wolffd@0:
GV_FILE_PATH wolffd@0:
wolffd@0: If SERVER_NAME is defined, image files are wolffd@0: restricted to the directory specified by GV_FILE_PATH. wolffd@0: Note that sometimes, when using one of the layout programs in a web wolffd@0: script, it is not enough to use an export command but rather the wolffd@0: variables should be set when the command is run, for example,
wolffd@0: wolffd@0: SERVER_NAME=xxx GV_FILE_PATH="images/" dot -Tpng -o x.png x.dot wolffd@0: wolffd@0:
GVBINDIR wolffd@0:
wolffd@0: Indicates which directory contains the Graphviz config file and wolffd@0: plug-in libraries. If it is defined, the value overrides any other wolffd@0: mechanism for finding this directory. If Graphviz is properly installed, wolffd@0: it should not be needed, though it can be useful for relocation on wolffd@0: platforms not running Linux or Windows. wolffd@0:
wolffd@0: wolffd@0: