Graphviz では、循環サブグラフ クラスターのレンダリングはサポートされていません。ただし、長方形のサブグラフを使用してノードをカプセル化できます。次に例を示します。
digraph G {
layout="fdp";
node [margin=0, fontcolor=blue, fontsize=18, width=0.4, shape=circle, style=filled]
subgraph cluster_A {
label = "Cluster A";
a1 ["shape"="point", "color"="blue", "style"="filled", fontsize="40"]
a2 ["shape"="point", "color"="blue", "style"="filled", fontsize="40"]
a3 ["shape"="point", "color"="blue", "style"="filled", fontsize="40"]
}
subgraph cluster_B {
label = "Cluster B";
b1 ["shape"="point", "color"="green", "style"="filled", fontsize="40"]
b2 ["shape"="point", "color"="green", "style"="filled", fontsize="40"]
b3 ["shape"="point", "color"="green", "style"="filled", fontsize="40"]
}
subgraph cluster_C {
label = "Cluster C";
c1 ["shape"="point", "color"="red", "style"="filled", fontsize="40"]
c2 ["shape"="point", "color"="red", "style"="filled", fontsize="40"]
c3 ["shape"="point", "color"="red", "style"="filled", fontsize="40"]
}
a1 -> b1
a2 -> b2
a3 -> b3
c1 -> b1
c2 -> b2
c3 -> b3
}