I’ve been trying get two graphs aligned. I did check this post.
This is the code I’ve played with:
digraph {
graph [
nodesep=1,
ranksep=0.9,
compound=true,
newrank=true
];
rankdir=LR;
node [shape=record, fontname="Helvetica"];
subgraph cluster_dev1 {
label="Device 1";
style=rounded;
color=gray50;
margin=12;
struct1 [
label="<port1>Tx|<port2>Rx";
];
}
subgraph cluster_dev2 {
label="Device 2";
style=rounded;
color=gray50;
margin=12;
struct2 [
label="<port1>Tx|<port2>Rx";
];
}
struct1:port1 -> struct2:port2;
struct2:port1 -> struct1:port2;
{rank=same struct1 struct2 }
}
And here is a demo
Any help? I want the subgraphs at the same distance from the top margin / horizontally aligned.