nojustify

Whether to justify multiline text vs the previous text line (rather than the side of the container).

type:bool, default:false

By default, the justification of multi-line labels is done within the largestcontext that makes sense. Thus, in the label of a polygonal node, aleft-justified line will align with the left side of the node (shifted by theprescribedmargin). In record nodes, left-justified line willline up with the left side of the enclosing column of fields. Ifnojustify=true, multi-line labels will be justified in the contextof itself.

For example, ifnojustify is set, the first label line is long, and thesecond is shorter and left-justified, the second will align with theleft-most character in the first line, regardless of how large the node mightbe.

See this example containing the\l (left-justify) escape-string:

Nojustify causes text to align with previous text line, not left side of box
digraph G {  node [width=3 shape=box]  a [nojustify=false label="The first line is longer\nnojustify=false\l"]  b [nojustify=true label="The first line is longer\nnojustify=true\l"]  a -> b}
Nojustify causes text to align with previous text line, not record column
digraph G{  c [nojustify=false shape=record label="{Records Example - Long Line\n | Title - Shorter Line\nnojustify=false\l}"]  d [nojustify=true shape=record label="{Records Example - Long Line\n | Title - Shorter Line\nnojustify=true\l}"]  c -> d}
Valid on:
  • Graphs
  • Clusters
  • Nodes
  • Edges

Search the Graphviz codebase for"nojustify"