Weird behavior with edge arrows

Hey, I’m pretty new to Graphviz and I’m trying to make a graph of vertical labels (as close as possible to eachother) that are sometimes connected by arrows. Most of it works fine, besides when you connect 2 nodes, then, for some reason, the nodes flip positions and the arrow points upwards instead of downwards.

digraph G {
   graph [rankdir="LR"]
   subgraph cluster_0{
       {
           rank=same
           node [shape=plaintext]
           _1 
           _2 
           _3 
           _4 
           _5 
           _6 
       }
       _1 _2 _3 _4 _5 -> _6

   }
}

Why is _6 and _5 in the wrong position?

Definitely annoying, but maybe not a bug. All nodes are on the same rank, and there is no way to specify what -> means - up or down.

Here is a different way to approach your goal:

digraph G {
   ranksep=.2
   subgraph cluster_0{
           node [shape=plaintext]
           edge [style=invis]
           _1 -> _2 ->_3 -> _4 -> _5
           edge [style=solid]
          _5 -> _6
   }
}

Giving:
reversedEdge2

Thanks, just a side question, can I make those labels closer by by any chance?

This reduces ranksep (graph-level) and margin + height (node-level)

digraph G {
   ranksep=.1  // 
   subgraph cluster_0{
           node [shape=plaintext margin=".02" height=.16]
           edge [style=invis]
           _1 -> _2 ->_3 -> _4 -> _5
           edge [style=solid]
          _5 -> _6
   }
}

Giving:
reversedEdge2