LinuxCommandLibrary

sfdp

Scalable force-directed graph layout engine

TLDR

Layout graph

$ sfdp [input.dot] -o [output.png]
copy
Output as SVG
$ sfdp -Tsvg [input.dot] -o [output.svg]
copy
Large graph layout
$ sfdp -Goverlap=prism [input.dot] -o [output.png]
copy
With custom parameters
$ sfdp -Gsize="10,10" [input.dot] -o [output.png]
copy

SYNOPSIS

sfdp [-T format] [-o file] [-G options] input

DESCRIPTION

sfdp is a scalable force-directed placement engine for laying out large undirected graphs. It is part of the Graphviz suite and reads graphs in DOT format, producing visual layouts suitable for graphs with thousands to tens of thousands of nodes.
The algorithm uses a multilevel approach that first coarsens the graph into progressively smaller representations, computes an initial layout on the coarsest level, then refines back through the levels. This strategy allows it to handle much larger graphs than simple force-directed methods like neato or fdp, while still producing aesthetically pleasing results that reveal community structure and clusters.
Output can be rendered in various formats including PNG, SVG, and PDF. Graph, node, and edge attributes control visual appearance through the standard Graphviz attribute system.

PARAMETERS

-T FORMAT

Output format (png, svg, pdf).
-o FILE
Output file.
-G ATTR=VAL
Graph attribute.
-N ATTR=VAL
Node attribute.
-E ATTR=VAL
Edge attribute.
-Goverlap MODE
Overlap removal.

CAVEATS

Memory intensive. Large graphs slow. Part of Graphviz package.

HISTORY

sfdp is part of Graphviz, implementing a scalable force-directed placement algorithm for large graph layouts.

SEE ALSO

dot(1), neato(1), fdp(1), twopi(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community