Lock Horizontal Elements

Hey everyone!
I am trying to place elements in an horizontal line, locking them into place and connecting them in lines without moving these from their position.
I tried using this method -

g = Digraph('G', filename='cluster.gv')
with g.subgraph(name='cluster_0') as c:
    c.edges([('a0', 'a1'), ('a1', 'a2'), ('a2', 'a3'),('a1','a3'),('a0','a2')])
g.graph_attr['rankdir'] = 'LR'
g

Which creates this -
image
I basically want to get rid of the lines between each adjacent element, but this -

g = Digraph('G', filename='cluster.gv')
with g.subgraph(name='cluster_0') as c:
    c.edges([('a1','a3'),('a0','a2')])
g.graph_attr['rankdir'] = 'LR'
g

Creates this -

And what I want to get is this -

Would love you assistance!

Have you tried making the undesired edges invisible?

Just googled it and didn’t figured out how to do it :expressionless:

Add color="invis" to the edges you want to disappear.forum

strict digraph "main"
{
    layout="dot";
    rankdir="LR";

    subgraph "cluster_1" { 
        "a0" -> "a1"[ color="invis" ];
        "a1" -> "a2"[ color="invis" ];
        "a2" -> "a3"[ color="invis" ];
        "a1" -> "a3";
        "a0" -> "a2";
    }
}