I have the following graph using dot layout:
digraph G {
graph [rankdir=LR];
subgraph {
[rank=same];
n2;
n1;
n1 -> n2;
}
n0 -> n1 -> n3;
}
Node n1 is drawn above n2. Is there any way to draw n2 above n1? n0, n1 and n3 are already placed as needed and should not move anymore. Using “neato” with fixed node positions is not possible in my environment. Has anybody please any idea?
Two solutions without changing
rankdir=LRwhich is known to cause some strange behavior:Solution 1:
Change
n1 -> n2;ton1 -> n2 [constraint=false];Solution 2:
Change
n1 -> n2;ton2 -> n1 [dir=back];