different ranks for dots
Submitted by Rockair on Fri, 11/11/2011 - 17:59
I have this code:
digraph g{
{rank=same; 2 ;}
{rank=same; 1;}
{rank=same; 3;}
2->3
}
this is a test code a developed to test this strangeness.
1,2,3 must have different ranks, but this code puts 1 and 2 on the same level. I can simulate this behavior with the addition of the line below:
1->2 [color=white, arrowhead=none]
anyone know a better way to achieve it?
thanks in advance
Recent comments
- No, 2.28 is a release
21 hours 55 min ago - Ok finaly i have time to test
1 day 3 hours ago - Well, there should be an
3 days 14 hours ago - Sorry, yes, the parallel edge
3 days 14 hours ago - I want more and more ...
5 days 15 hours ago - Graphviz provides a small
6 days 2 hours ago - Actually, we have been
6 days 23 hours ago - What machine are you running
1 week 14 hours ago - Graphviz is a collection of
1 week 1 day ago - Thanks. I tried running it
1 week 1 day ago

different ranks for dots
The dot layout puts nodes on different ranks if there is an edge between them, assuming you haven't specified any other constraints. If you want 3 nodes on 3 different ranks, you need to do something like
digraph {
1 -> 2 -> 3
}
If you don't want to see the edges, use 1 -> 2 -> 3 [style=invis]
Note that using {rank=same ...} specifies that all the nodes in the subgraph share the same rank, so using this with only one node in the subgraph has no effect.