unflatten1
Adjust directed graphs to improve layout aspect ratio
Usage
unflatten [-f?]
[-llen]
[-clen]
[-o
outfile]
[files]
Overview
unflatten is a preprocessor to dot that is used to improve the aspect ratio of graphs having many leaves or disconnected nodes. The usual layout for such a graph is very wide or tall. unflatten creates chains with invisible edges or adjusts the minlen on edges to improve layout compaction.
Options
The following options are supported:
-llen-
The
minlenof leaf edges is staggered between 1 and len (a small integer).
-
-f -
Applies the
-loption to fanout nodes whose indegree and outdegree are both 1. This helps with structures such as a -> {w x y z} -> b. This option only works if the-lflag is set.
-clen-
Form disconnected nodes into chains of up to len edges.
-ooutfile-
causes the output to be written to the specified file; by default, output is written to
stdout.
-
-? -
Prints the usage and exits.
Operands
The following operand is supported:
- files
-
Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used.
Releases
12 releases since Debian 3.1 (Sarge); the text changed 1 time.
-? since Arch Linux 2026-11-01.