I can use this code to generate a graph:
file test.dot:
digraph g {
{rank=same; 1 -> 2 -> 3 -> 4}
{rank=same; 5 -> 6 -> 7 -> 8}
{rank=same; 9 -> 10 -> 11 -> 12}
4 -> 5
8 -> 9
}
dot test.dot -Tpng -o test.png
output:
However, I want the ranks of nodes to be aligned more like this:
Is it possible to make a graph shaped like this in graphviz dot?


