UNFLATTEN(1)

πŸ“¦
version 16.1.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– UNFLATTEN(1) πŸ’–

okay bestie, welcome to the unflatten page from the General Commands Manual β€” she's a graph-glow-up girlie and she's about to fix ur ugly layouts ✨


✨ NAME ✨

unflatten β€” adjust directed graphs to improve layout aspect ratio πŸ¦‹


✨ SYNOPSIS ✨

unflatten [-f?]  [-llen] [-clen ] [ -o outfile ] [ files ]

✨ DESCRIPTION ✨

so unflatten is a preprocessor to dot, and her whole job is making graphs look less unhinged πŸ’…. Specifically, she improves the aspect ratio of graphs that have a ton of leaves or disconnected nodes β€” bc ngl, the usual layout for a graph like that is so wide or so tall it's giving "screenshot won't fit on the slide" 😭.

What she does is create chains with invisible edges, or adjust the minlen on edges, to improve layout compaction. Lowkey iconic behaviour fr fr. πŸ‘‘


✨ OPTIONS ✨

the following options are supported, and yes we're listing every single one:

  • -l len β€” the minlen of leaf edges gets staggered between 1 and len (and len is a small integer, so don't get crazy with it).
  • -f β€” applies the -l option to fanout nodes whose indegree and outdegree are both 1. This helps with structures such as a -> {w x y z} -> b. 🫢
heads up bestie: this option only works if the -l flag is set. No -l, no -f magic. that's just the rules.
  • -c len β€” form disconnected nodes into chains of up to len edges. πŸŽ€
  • -o outfile β€” causes the output to be written to the specified file; by default, output is written to stdout. (yes, the default is stdout, she said what she said)
  • -? β€” prints the usage and exits. short, sweet, iconic. πŸ™ˆ

✨ 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. 🌸

✨ AUTHORS ✨

  • Stephen C. North <north@research.att.com>
  • Emden R. Gansner <erg@research.att.com>

the literal main characters of this whole thing, we stan πŸ§šπŸ’œ


✨ SEE ALSO ✨

gc(1), dot(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), tred(1), libgraph(3)

the whole friend group, go say hi 🌈


and that's the page!! this version dropped way back on 21 January 2001 as part of the unflatten(1) manual β€” old money, timeless vibe. love that for her. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from