Pre-Script
... And only when I finished the production of this example, I saw the roundtrip thread theme , which looks beautiful. Since I already said it here, I might also ask: are there any other alternatives?
Original publication
Is there a way to automatically lay out nodes in a rectangular layout when on a subgraph?
As an example, let's say I have this structure:
digraph
{
rankdir="LR";
node [ shape="circle", style="bold, filled", fillcolor="#dddddd" ];
a -> b -> c -> d -> e -> f -> g -> h -> b;
}
It gives a chart

My goal is for them to line up in a rectangle with rows of three nodes, forming
If I try to keep my rank and change rankdir, this is not as expected (I assume because you cannot change rankdirlike this):
digraph
{
rankdir="LR";
node [ shape="circle", style="bold, filled", fillcolor="#dddddd" ];
a -> b -> c -> d -> e -> f -> g -> h -> b;
subgraph
{
rankdir="TB";
rank="same";
c; d; e;
}
subgraph
{
rankdir="TB";
rank="same";
f; g; h;
}
}

, , :
digraph
{
rankdir="LR";
node [ shape="circle", style="bold, filled", fillcolor="#dddddd" ];
a -> b -> c -> d -> e -> f -> g -> h -> b;
{ rank="same"; c; h; }
{ rank="same"; d; g; }
{ rank="same"; e; f; }
}

Edit
, . , , ( )!
digraph
{
rankdir="LR";
node [ shape="circle", style="bold, filled", fillcolor="#dddddd" ];
a -> b -> c -> d -> e;
e -> f [ constraint="false" ];
b -> h -> g -> f [ dir="back" ];
}
