type: string, default: "t" (clusters) , "b" (root graphs) , "c" (nodes)
For graphs and clusters, only labelloc=t and labelloc=b are allowed, corresponding to placement at the top and bottom, respectively.
By default, root graph labels go on the bottom and cluster labels go on the top.
Note that a subgraph inherits attributes from its parent. Thus, if the root graph sets labelloc=b, the subgraph inherits this value.
For nodes, this attribute is used only when the height of the node is larger than the height of its label.
If labelloc=t, labelloc=c, labelloc=b, the label is aligned with the top, centered, or aligned with the bottom of the node, respectively.
By default, the label is vertically centered.
digraph {
labelloc="t"
label="Title"
a -> b
}
digraph {
labelloc="b"
label="Title"
a -> b
}
digraph {
label="Graph Title"
subgraph cluster_t {
labelloc="t"
label="Cluster Top"
a -> b
}
subgraph cluster_b {
labelloc="b"
label="Cluster Bottom"
c -> d
}
}
digraph {
t [labelloc=t]
c [labelloc=c]
b [labelloc=b]
}
© 2025 The Graphviz Authors
Licensed under the Eclipse Public License 1.0.
https://www.graphviz.org/docs/attrs/labelloc/