LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fdp

force-directed graph layout engine

TLDR

Generate graph from DOT file
$ fdp -Tpng [graph.dot] -o [output.png]
copy
Output SVG format
$ fdp -Tsvg [graph.dot] -o [output.svg]
copy
Process from stdin
$ echo 'graph { a -- b }' | fdp -Tpng -o [output.png]
copy
Set graph attributes
$ fdp -Gsize="10,10" -Tpng [graph.dot] -o [output.png]
copy

SYNOPSIS

fdp [options] [files]

DESCRIPTION

fdp is a Graphviz layout engine for drawing undirected graphs using a force-directed placement algorithm. It positions nodes by simulating physical forces between connected and unconnected nodes.The spring model algorithm treats edges as springs and nodes as charged particles. It iteratively adjusts positions until reaching equilibrium, producing aesthetically pleasing layouts for many graph types.fdp is suited for undirected graphs where node clustering and edge lengths should reflect graph structure.

PARAMETERS

FILES

DOT graph files to process.
-T FORMAT
Output format: png, svg, pdf, ps, etc.
-o FILE
Output file.
-G ATTR=VALUE
Set graph attribute.
-N ATTR=VALUE
Set node attribute.
-E ATTR=VALUE
Set edge attribute.
-K LAYOUT
Override layout engine.
--help
Display help information.

INSTALL

sudo apt install graphviz
copy
sudo dnf install graphviz
copy
sudo pacman -S graphviz
copy
sudo apk add graphviz
copy
sudo zypper install graphviz
copy
brew install graphviz
copy
nix profile install nixpkgs#graphviz
copy

CAVEATS

May not converge for very large graphs. Random initial placement means non-deterministic results. Better for undirected graphs than directed.

HISTORY

fdp is part of Graphviz, the graph visualization software from AT&T Labs. It implements force-directed placement algorithms developed for graph drawing research, providing an alternative to dot's hierarchical layout.

SEE ALSO

dot(1), neato(1), sfdp(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid