自己写的dot例子
digraph G {
rankdir=TB;
compound=true;
node [shape=box]
subgraph cluster_struct_a {
{rank=same; a0; a1; a2; a3}
a0 -> a1 -> a2 -> a3 [color=grey arrowhead=none maxlen=0.1];
label = "struct a";
color=green;
}
subgraph cluster_level{
color=white;
{rank=same; }
subgraph cluster_struct_b {
{rank=same; b0 -> b1 -> b2 -> b3 [color=grey arrowhead=none minlen=1];}
label = "struct b";
color=blue;
}
subgraph cluster_struct_c {
{rank=same; c0; c1; c2; c3}
c0 -> c1 -> c2 -> c3 [color=grey arrowhead=none];
label = "struct c";
color=orange;
}
subgraph cluster_struct_d {
{rank=same; d0; d1; d2; d3}
d0 -> d1 -> d2 -> d3 [color=grey arrowhead=none];
label = "struct d";
color=red;
}
subgraph cluster_struct_e {
{rank=same; e0; e1; e2; e3}
e0 -> e1 -> e2 -> e3 [color=grey arrowhead=none];
label = "union d";
color="#ff1020";
}
}
a0 -> b0 [lhead=cluster_struct_b, minlen=2];
a1 -> c0 [lhead=cluster_struct_c, minlen=2];
a2 -> d0 [lhead=cluster_struct_d, minlen=2];
a3 -> e0 [lhead=cluster_struct_e, minlen=2];
}