type: bool, default: false
By default, the justification of multi-line labels is done within the largest context that makes sense. Thus, in the label of a polygonal node, a left-justified line will align with the left side of the node (shifted by the prescribed margin). In record nodes, left-justified line will line up with the left side of the enclosing column of fields. If nojustify=true, multi-line labels will be justified in the context of itself.
For example, if nojustify is set, the first label line is long, and the second is shorter and left-justified, the second will align with the left-most character in the first line, regardless of how large the node might be.
See this example containing the \l (left-justify) escape-string:
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
}
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
}
© 2025 The Graphviz Authors
Licensed under the Eclipse Public License 1.0.
https://www.graphviz.org/docs/attrs/nojustify/