twopi
TLDR
Generate a radial layout and output as PNG
SYNOPSIS
twopi [-Gname=value] [-Nname=value] [-Ename=value] [-Tformat] [-o outfile] [files]
DESCRIPTION
twopi is a Graphviz layout program that draws graphs using a radial layout algorithm. One node is chosen as the center and placed at the origin, with remaining nodes arranged on concentric circles at increasing distances based on their graph distance from the center.
Nodes at distance 1 from the center appear on the first ring, nodes at distance 2 on the second ring, and so forth. This layout is particularly effective for visualizing hierarchies, network topologies, and trees where relationships radiate from a central point.
The center node can be specified with the root attribute; otherwise, twopi selects a node furthest from any leaf node. The spacing between rings is controlled by ranksep (default 0.75 inches). Node overlaps can be resolved using the overlap attribute with Voronoi diagrams or scaling.
Input must be in DOT graph language format. twopi is part of the Graphviz suite alongside dot, neato, circo, fdp, and sfdp.
PARAMETERS
-T format
Output format: png, svg, pdf, ps, jpg, gif, and many others.-o file
Output file name. If omitted, output goes to stdout.-Gname=value
Set graph attribute. Common attributes: root, ranksep, overlap.-Nname=value
Set default node attribute.-Ename=value
Set default edge attribute.-K layout
Specify layout engine (default: twopi).-V
Print version information.-?
Print usage information.
CAVEATS
For large graphs, radial layouts can become cluttered as outer rings contain exponentially more nodes. The automatic center selection may not always produce optimal results; manually specifying the root node often improves layout quality. Memory usage scales with graph size.
HISTORY
twopi was developed as part of Graphviz at AT&T Labs Research in the 1990s. The radial layout algorithm is based on work by Graham Wills presented at the Graph Drawing Symposium in 1997. Graphviz was open-sourced in 2000 and continues to be actively maintained.


