TBbalance

Which rank to move floating (loose) nodes to

type: string, default: ''

Valid options:

  • "min": Move floating (loose) nodes to minimum rank.
  • "max": Move floating (loose) nodes to maximum rank.
  • Otherwise, floating nodes are placed anywhere.

Despite the name TBbalance ("Top-Bottom Balance"), this also works with left-right ranks, e.g. rankdir=LR.

Examples:

Default Behaviour
digraph {
    layout="dot"

    { rank="min"; "min" }
    { rank="max"; "max" }
    "min" -> "middle" -> "max"
    
    "Floater 1"
    "Floater 2"
}
Floating nodes moved to min rank
digraph {
    layout="dot"
    TBbalance="min"

    { rank="min"; "min" }
    { rank="max"; "max" }
    "min" -> "middle" -> "max"
    
    "Floater 1"
    "Floater 2"
}
Floating nodes moved to max rank
digraph {
    layout="dot"
    TBbalance="max"

    { rank="min"; "min" }
    { rank="max"; "max" }
    "min" -> "middle" -> "max"
    
    "Floater 1"
    "Floater 2"
}
Valid on:
  • Graphs

Note: dot only.

Search the Graphviz codebase for "TBbalance"

Last modified September 27, 2022: Add docs for TBbalance (b838ec8)