2 [label="0/7"]; 1 -> 3 " /> 2 [label="0/7"]; 1 -> 3 " /> 2 [label="0/7"]; 1 -> 3 "/>

Graphviz (neato) label overlaps edge problem

206 views Asked by At

I have simple network generated with graphviz(neato):

  digraph G{
      edge [len = 1.5, fontcolor=blue];
      0 -> 1 [label="0/8"];
      0 -> 2 [label="0/7"];
      1 -> 3 [label="0/6"];
      2 -> 1 [label="0/2"];
      2 -> 4 [label="0/7"];
      3 -> 2 [label="0/5"];
      3 -> 5 [label="0/10"];
      4 -> 3 [label="0/4"];
      4 -> 5 [label="0/2"];
  }

This code generates: network

As you can see, the label for 0 -> 1(3->2 and 4->5 too) edge overlaps the edge. Is there any way to avoid it? I have changed len and fontcolor to make a contrast, but still that is not satisfying.

1

There are 1 answers

0
sroush On
  1. You might also try using dot. I think it produces a more readable graph for this input. (eye of the beholder)
  2. And/or:
digraph G{
      edge [len = 1.5, fontcolor=blue];
      0 -> 1 [label="0/8"];
      0 -> 2 [label="0/7 "];
      1 -> 3 [taillabel="  0/6"];
      2 -> 1 [label="0/2"];
      2 -> 4 [headlabel="0/7  "];
      3 -> 2 [label="0/5 "];
      3 -> 5 [label="0/10"];
      4 -> 3 [label="0/4"];
      4 -> 5 [label="0/2  "];
  }

enter image description here