I am trying to go through the dot language for drawing directed graphs. While trying to get a grip on the ways to correctly lay the nodes in the graphs, I am trying to place a set of nodes and arrange them relative to each other. Somewhat akin to creating building blocks (placing one brick over two staggered ones).
I am trying to this as:
digraph {
ranksep=.05;
rankdir=RL;
B -> A [style=invis];
C -> B [style=invis];
E -> W [style="invis"];
O -> P [style=invis];
R -> E [style=invis];
A[shape=star,color=yellowgreen,style=filled,label="S"];
B[shape=star,color=yellowgreen,style=filled,label="U"];
C[shape=star,color=yellowgreen,style=filled,label="N"];
P,O,W,E,R [shape=house,color=brown,style=filled];
{rank=same; A; O};
{rank=same; B; W};
{rank=same; C; E};
}
I am trying to draw the graph in a way so that the nodes A, B and C should come first (i.e. above the rest of the nodes P,O,W,E,R.
Can somebody guide me the correct way to do this?
The result I am currently getting is:


