我一直试图在Dot中实施维恩图。虽然Venn Diagrams可能在Dot中没有用,但它主要是因为我可以将它作为一个非常基本的构建块。
我提供了一些尝试这样做的方法:
graph G {
subgraph cluster0 {
color=white;
subgraph cluster0 {
label="1";
color=black;
a;
b;
}
subgraph cluster1 {
label="2";
color=black;
b;
c;
}
}
subgraph cluster1 {
color=white;
subgraph cluster2 {
label="1";
color=black;
d;
}
subgraph cluster3 {
label="1+2";
color=black;
e;
}
subgraph cluster4 {
label="2";
color=black;
f;
}
}
subgraph cluster2 {
color=white;
subgraph cluster5 {
label="1";
color=black;
g;
subgraph cluster6 {
label="2";
color=black;
h;
}
}
subgraph cluster6 {
label="2";
color=black;
i;
}
}
a -- d -- g [penwidth=0];
b -- e -- h [penwidth=0];
c -- f -- i [penwidth=0];
}
产:
这些都有问题:
b
位于1
,但不是2
。它应该在两者中。1
和2
分开。并且很难显示它们两者。2
子图连接在一起。为了防止出现XY问题,我有:
三个应用程序。位于:
导致:
graph G {
subgraph cluster0 {
color=white;
subgraph cluster0 {
label="Server1";
color=black;
a;
subgraph cluster0 {
label="Docker";
b;
}
}
subgraph cluster1 {
label="Server2";
color=black;
subgraph cluster0 {
label="Docker";
c;
}
}
}
subgraph cluster1 {
color=white;
subgraph cluster0 {
label="Server1";
color=black;
d;
}
subgraph cluster1 {
label="Docker";
color=black;
subgraph cluster0 {
label="Server1";
e;
}
subgraph cluster1 {
label="Server2";
f;
}
}
}
a -- d [penwidth=0];
b -- e [penwidth=0];
c -- f [penwidth=0];
}