Why doesn't rankdir work

I have the following dot code

digraph FST {
rankdir = “LR”;
size = “8.5,11”;
label = “”;
center = 1;
orientation = Landscape;
ranksep = “0.4”;
nodesep = “0.25”;
0 [label = “0”, shape = circle, style = bold, fontsize = 14]
0 → 1 [label = “:/0.69315”, fontsize = 14];
0 → 2 [label = “:/0.69315”, fontsize = 14];
1 [label = “1”, shape = doublecircle, style = solid, fontsize = 14]
1 → 3 [label = “ae1:abbey”, fontsize = 14];
1 → 5 [label = “b:bare”, fontsize = 14];
1 → 1 [label = “sil:'SIL/0.69315”, fontsize = 14];
1 → 2 [label = “sil:'SIL/0.69315”, fontsize = 14];
2 [label = “2”, shape = circle, style = solid, fontsize = 14]
2 → 1 [label = “sil:”, fontsize = 14];
3 [label = “3”, shape = circle, style = solid, fontsize = 14]
3 → 4 [label = “b:”, fontsize = 14];
4 [label = “4”, shape = circle, style = solid, fontsize = 14]
4 → 1 [label = “iy0:/0.69315”, fontsize = 14];
4 → 2 [label = “iy0:/0.69315”, fontsize = 14];
5 [label = “5”, shape = circle, style = solid, fontsize = 14]
5 → 6 [label = “eh1:”, fontsize = 14];
6 [label = “6”, shape = circle, style = solid, fontsize = 14]
6 → 1 [label = “r:/0.69315”, fontsize = 14];
6 → 2 [label = “r:/0.69315”, fontsize = 14];
}

however, when i use the following command to convert the above code to svg, i got a wrong image as showing below.

cat a.dot | dot -Tsvg > a.svg

What I expect is like this

As you can see I have used LR as rankdir.

rankdir = “LR”;

My quesion is how to get the second image?

(Also answered on stackoverflow)
Remove orientation = Landscape; and you get the desired graph.

1 Like

yes, it works now. Thanks! :grinning: