Linux command
neato 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Generate PNG from DOT file
neato -Tpng [graph.dot] -o [output.png]
Generate SVG
neato -Tsvg [graph.dot] -o [output.svg]
Generate PDF
neato -Tpdf [graph.dot] -o [output.pdf]
Read from stdin
echo "graph { a -- b }" | neato -Tpng -o [output.png]
Set graph attributes
neato -Gsize="10,10" -Nshape=box [graph.dot] -o [output.png]
说明
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.
参数
- -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.
FAQ
What is the neato command used for?
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.
How do I run a basic neato example?
Run `neato -Tpng [graph.dot] -o [output.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -T _format_ do in neato?
Output format (png, svg, pdf, etc.).