Y-axis output is not order
It is in order, but not in the order that you want. 

It is currently treating the indices as a string. 

To get your desired index as numerics, here are some codes that hopefully can help you.

&gt; c = c("1", "2", "13")
&gt; c = sort(c)
&gt; c
[1] "1"  "13" "2" 
&gt; c = strtoi(c)
&gt; c
[1]  1 13  2
&gt; sort(c)
[1]  1  2 13