Is it possible to put the text on the left side of the arrow?

+2 votes
asked May 3, 2013 in Wanted features by anonymous


I have a state diagram.


State1 -down->  State2: goes to

now I will get in the png-picture - pipe symbol meaning the down arrow:

state1 | goes to state2

Can I have

state1 goes to | state2

I have tried and searched but without success.

I do not mean notes. I know it is possible with notes.

Thank you in advance.

Best regrads,





1 Answer

0 votes
answered May 3, 2013 by plantuml (279,680 points)
Unfortunatly, PlantUML is using Graphviz/Dot for that.

And I don't think that it is possible to change label position in edges.
(More info on )

digraph G {
    a -> b [label="foo"]

If someone succeeds in changing the label with Graphviz/Dot, please post here.


commented Mar 4, 2014 by duedl0r (100 points)

maybe you could add functionality to use headlabel/labeldistance/labelangle?
commented Mar 4, 2014 by plantuml (279,680 points)
Thanks for your idea.
Unfortunatly, labelangle does not apply to label, only to headlabel/taillabel.
( )

See here an example:

digraph G {
    a -> b [label="foo", headlabel = "1", labelangle=20]
    a -> c [label="foo", headlabel = "1", labelangle=-20]

A trick could indeed to use headlabel and to automatically compute a "labeldistance".
It's possible to do that on manual edited dot file, but on an generated file, that's another story.
So we are still looking for something here.
commented Mar 23, 2017 by stephan (270 points)
according to this stackoverflow contribution

it seems possible to add this using the xlabel feature of current graphviz

essential parts copied from the reference:
Graphviz Graph with arrow-text-anchor changed

digraph {

    0:sw -> 1:nw [ dir=forward, xlabel="  (1, 0)  "];
    0 -> 1 [dir=none];
    1:ne -> 0:se [ dir=backward, xlabel= "  (0, -1)  "];

you need graphviz version >2.29 to use xlabel.
commented Jan 23, 2019 by anonymous
This would be great if it were possible (start using xlabel).
commented Jul 23 by setop (300 points)
could be a skin param ...