in case I use the following Graphviz code, a simple graph will be created which shows the label on the right hand side.
digraph lable_on_the_right_side {
/* define nodes */
node [color=lightblue2, style=filled, fontname=Arial];
a [label="S1"];
b [label="S2"];
/* define edges */
a -> b [label="Label on the right side"]
}
Is it possible to let the label appear on the left side instead? If yes, what would the code need to look like?
There aren't many ways to change the position of the text of an edge label - you could try to add some extra empty spaces to label... Sometimes also double edges have the effect of having one label to the right, the other one to the left.
Still hacky, but at least repeatable, you may use a headlabel
(or taillabel
) and then use labelangle
together with labeldistance
to position the label where you'd like:
a -> b [
headlabel="Label on the left side"
labeldistance=7.5
labelangle=75
]
With a little trial and error you may place the label where needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With