Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edge pointing at edge with Graphviz and Dot

I would like to point an edge towards another edge in graphviz using the dot format.

What I got so far:

digraph G {
    Hello->dummy;
    dummy->World;
    dummy[shape=point width=0];
    Test->dummy;
}

which produces

current status

what I would like to get is something more similar to this:

enter image description here

Any ideas how to do so?

like image 552
Sebastian Avatar asked Jul 16 '16 10:07

Sebastian


1 Answers

Maybe rank = same does the trick?

digraph G
{
  { rank = same; Test; dummy }        // dummy and Test on the same level
  dummy[ shape = point, width = 0 ];                         // connector
  Hello -> dummy[ arrowhead = none ];    // remove arrowhead to connector
  dummy -> Test[ dir = back ];         // you want Test on the right side
  dummy -> World;
}

yields

enter image description here

like image 93
vaettchen Avatar answered Sep 20 '22 09:09

vaettchen