Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

head and tail labels overlap the arrow

Tags:

graphviz

In the following code, the head and tail labels overlap the arrow, which I do not want. What do I have to do?

digraph G {
    node [shape = "record"];

    edge [
      arrowhead = "normal"
      headlabel = "0..*"
      taillabel = "longlabel"
    ];


    N1 [ label="N1"];         
    N2 [label = "N2" ];       

    N1->N2;
}
like image 516
clx Avatar asked Feb 26 '13 21:02

clx


1 Answers

You can't really control the position of head and tail-labels as it is possible for the edge label (using labelangle, labeldistance, etc.)

However, as a hack, you could add whitespace to the head/tail-label and that way force the center of the label to be on the left or right of the label text:

  headlabel = "        0..*"
  taillabel = "longlabel             "
like image 158
marapet Avatar answered Jan 03 '23 13:01

marapet