graphviz
TLDR
Render DOT file to PNG
$ dot -Tpng [graph.dot] -o [graph.png]
Render to SVG$ dot -Tsvg [graph.dot] -o [graph.svg]
Use different layout engine$ neato -Tpng [graph.dot] -o [graph.png]
Render to PDF$ dot -Tpdf [graph.dot] -o [graph.pdf]
Circular layout$ circo -Tpng [graph.dot] -o [graph.png]
SYNOPSIS
dot [options] [files]
DESCRIPTION
Graphviz is a graph visualization toolkit. It reads graph descriptions in DOT language and renders them as images. Multiple layout algorithms handle different graph types.
PARAMETERS
-T format
Output format: png, svg, pdf, ps, jpg.-o file
Output file.-K engine
Layout engine: dot, neato, fdp, sfdp, circo, twopi.-G name=value
Set graph attribute.-N name=value
Set node attribute.-E name=value
Set edge attribute.
LAYOUT ENGINES
$ dot - Hierarchical (directed graphs)
neato - Spring model (undirected)
fdp - Force-directed
sfdp - Scalable force-directed
circo - Circular layout
twopi - Radial layout
neato - Spring model (undirected)
fdp - Force-directed
sfdp - Scalable force-directed
circo - Circular layout
twopi - Radial layout
DOT LANGUAGE
$ digraph G {
A -> B;
B -> C;
A -> C;
A [shape=box];
B [color=red];
}
A -> B;
B -> C;
A -> C;
A [shape=box];
B [color=red];
}
CAVEATS
Large graphs may be slow to render. Layout quality varies by algorithm choice. Complex styling requires learning DOT attributes. Text rendering may vary by output format.
HISTORY
Graphviz was developed at AT&T Labs Research, with initial work by Stephen North, Emden Gansner, and others in the 1990s. It was open-sourced and became the standard for programmatic graph visualization.


