Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Order nodes of same rank with dot

Tags:

graph

dot

I am using dot to draw a directed graph. In this graph I want to have the nodes at the same rank to appear in a pre-defined order. Is this possible?

like image 655
Matthias Avatar asked Oct 30 '22 08:10

Matthias


1 Answers

I've only found a hackish solution: add (invisible) constraints to represent ordering.

node1 -> node2  [style=invis]
node2 -> node3  [style=invis]
...

More compact version:

node1 -> node2 -> node3 -> node4  [style=invis]
like image 72
YvesgereY Avatar answered Jan 12 '23 22:01

YvesgereY