0

I have a label that barely touch the edge, but there were plenty of space round it, is there anyway to make it not touching the edge in Graphiz? This is minor issue, but I have to redraw in powerpoint if cannot resolve by coding as my collaborator is very unhappy about this.. (Or I may export to JPEG and make changing in paintbrush)...

And we have to do this in black and white only so changing color would not help :(

enter image description here

minimal example: (the whole diagram is much more complex, and I have to put A E B in the same rank)

digraph "md" {
  rankdir=TB;
  size="8,8";
  node [fontname="Helvetica" fontsize=10 shape=box];
  edge [fontname="Helvetica" fontsize=10];
  center=1;
  {rank=min "A"}
   {rank=min "B"}
  {rank=min "E"}


  "A" -> "B" [label="0.55***", dir=both];

  "E" -> "B" [label="0.22" labeldistance="2"];

}
ceoec
  • 203
  • 2
  • 10
  • Can you supply a [minimal, complete and verifiable example](http://stackoverflow.com/help/mcve) of a .dot file that shows this behavior? – Jongware May 23 '15 at 10:27
  • @Jongware, supply above, thanks! – ceoec May 23 '15 at 11:45
  • looks to me like this: http://stackoverflow.com/questions/2350617/how-to-place-edge-labels-on-edge-in-graphviz – Jörn Hees May 23 '15 at 12:50
  • Thanks, I actually tried label distance with different values but it doesn't work, so I am trying to see if I can find a solution here now..... – ceoec May 23 '15 at 13:25

1 Answers1

3

For the records - making the example minimal

digraph {
    { rank=same A -> B -> C }
    A -> C [label=AC]
}

gives

enter image description here

using xlabel instead of label may help (but seems to have side effects)

digraph {
    { rank=same A -> B -> C }
    A -> C [xlabel=AC]
}

gives

enter image description here

stefan
  • 3,681
  • 15
  • 25