I want to render several trees simultaneously and place all root nodes and all leaf nodes on the same level.
Here\'s an example of what I\'m trying to do. Root nodes A a
The ideal structure is actually rank max and rank min. No need for a subgraph or any other shenanigans. GraphViz has explicit facilities for this.
With complex graphs, rank=same will often end up near the middle of the graph. If you mean top and bottom, say top and bottom.
digraph G {
rankdir = TB;
A -> B;
A -> C -> D;
X -> Y;
{ rank=min; A; X; }
{ rank=max; B; D; Y; }
}