Command-line Invocation


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

Flags

-Gname[=value]
Set a graph attribute, with default value = true.
-Nname[=value]
Set a default node attribute, with default value = true.
-Ename[=value]
Set a default edge attribute, with default value = true.
-Tformat
Set output language to one of the supported formats. By default, attributed dot is produced.
-V
Emit version information and exit.
-llibfile
User-supplied, device-dependent library files. Multiple libraries may be given. These names are passed to the code generator at the beginning of output.
-n[num]
Sets no-op flag in neato. If set, neato assumes nodes have already been positioned and have a pos attribute giving this position. It then just computes the edge layouts and emits the graph in the appropriate format. If num is supplied and > 1, neato checks for previously positioned edges, with control points provided in the pos attribute. It uses these if given; otherwise, it computes the edge layout.
-ooutfile
Write output to file outfile. By default, output goes to stdout.
-s[scale]
Set input scale to scale. If this value is omitted, 72.0 is used. This number is used to convert the point coordinate units used in the pos attribute into inches. For example, dot -Tdot produces pos values in points, with 72 per inch. Thus, to use this output as input to neato -n, one needs -s (equivalently, -s72).
-v
Verbose mode
-x
In neato, on input, prune isolated nodes and peninsulas. This removes uninteresting graph structure and produces a less cluttered drawing.
-y
By default, the coordinate system used in generic output formats, such as attributed dot, extended dot, plain and plain-ext, is the standard cartesian system with the origin in the lower left corner, and with increasing y coordinates as points move from bottom to top. If the -y flag is used, the coordinate system is inverted, so that increasing values of y correspond to movement from top to bottom.
If multiple -T flags are given, drawings of the graph are emitted in each of the specified formats. Multiple -o flags can be used to specify the output file for each format. If there are more formats than files, the remaining formats are written to stdout.

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

Environment Variables

GDFONTPATH List of pathnames giving directories which a program should search for fonts. Overridden by DOTFONTPATH.
DOTFONTPATH List of pathnames giving directories which a program should search for fonts. Overridden by fontpath.