LinuxCommandLibrary

neato

TLDR

Generate PNG from DOT file

$ neato -Tpng [graph.dot] -o [output.png]
copy
Generate SVG
$ neato -Tsvg [graph.dot] -o [output.svg]
copy
Generate PDF
$ neato -Tpdf [graph.dot] -o [output.pdf]
copy
Read from stdin
$ echo "graph { a -- b }" | neato -Tpng -o [output.png]
copy
Set graph attributes
$ neato -Gsize="10,10" -Nshape=box [graph.dot] -o [output.png]
copy

SYNOPSIS

neato [options] [files...]

DESCRIPTION

neato is a Graphviz layout program for undirected graphs. It uses a spring model algorithm to produce aesthetically pleasing layouts, making it ideal for network diagrams and relationship graphs.
Unlike dot (hierarchical), neato creates symmetric, radial layouts.

PARAMETERS

-T format

Output format (png, svg, pdf, etc.).
-o file
Output file.
-G attr=val
Graph attribute.
-N attr=val
Node attribute.
-E attr=val
Edge attribute.
-K layout
Layout engine.

EXAMPLE GRAPH

$ graph G {
    a -- b -- c;
    b -- d;
    a -- d;
}
copy

LAYOUT ENGINES

$ neato  - Spring model (undirected)
dot    - Hierarchical (directed)
circo  - Circular
fdp    - Force-directed
sfdp   - Large graphs
copy

CAVEATS

Better for undirected graphs. Large graphs may be slow. Overlap removal may need tuning.

HISTORY

neato was developed by Stephen North at AT&T Labs as part of the Graphviz suite, implementing the Kamada-Kawai spring algorithm.

SEE ALSO

dot(1), circo(1), fdp(1), graphviz(1)

Copied to clipboard