# Why doesn't rankdir work

**URL:** <https://forum.graphviz.org/t/why-doesnt-rankdir-work/1470>\
**Category:** Uncategorized\
**Created:** [February 23, 2023, 10:06am UTC](https://forum.graphviz.org/t/why-doesnt-rankdir-work/1470 "2023-02-23T10:06:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aban](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@aban](https://forum.graphviz.org/u/aban)\
**Post date:** [February 23, 2023, 10:06am UTC](https://forum.graphviz.org/t/why-doesnt-rankdir-work/1470/1 "2023-02-23T10:06:00Z")

</div>

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

 ![a](https://global.discourse-cdn.com/graphviz/original/1X/9bf25cd16cd08ff813dfabfcce556eccba9fc0cc.png)

What I expect is like this

 ![b](https://global.discourse-cdn.com/graphviz/original/1X/39b1a9a0cd16c78926e51a4c5ff2e9dc6cb99d0c.png)

As you can see I have used LR as rankdir.

> rankdir = “LR”;

My quesion is how to get the second image?

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [February 23, 2023, 2:32pm UTC](https://forum.graphviz.org/t/why-doesnt-rankdir-work/1470/2 "2023-02-23T14:32:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aban](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@aban](https://forum.graphviz.org/u/aban)\
**Post date:** [February 24, 2023, 1:00am UTC](https://forum.graphviz.org/t/why-doesnt-rankdir-work/1470/3 "2023-02-24T01:00:47Z")

</div>

yes, it works now. Thanks! 😀
