我想尝试这样的事情:
我的代码仍处于此阶段:
不幸的是,我不能用VennDiagram包设置圆圈中心的坐标。有谁知道实现这一目标的诀窍?或者是另一个更接近我正在寻找的图形的包?
library(VennDiagram)
venn.plot <- draw.triple.venn(area1=A, area2=B, area3=C,
n12 =A, n23 = B, n13 = A, n123 = A,
fill = c("yellow1", "yellow3", "yellow4"),
euler = TRUE,
c("First", "Second", "Third") )
答案 0 :(得分:2)
对于您的特定情况(嵌套子集),您可以使用网格手动绘制三个圆圈。假设集合A包含集合B包含集合C:
library(grid)
set_sizes <- c(A = 25, B = 16, C = 9)
set_radii <- 0.5 * c(
A = 1,
B = sqrt(set_sizes["B"] / set_sizes["A"]),
C = sqrt(set_sizes["C"] / set_sizes["A"])
)
grid.newpage()
grid.circle(
y = set_radii,
r = set_radii,
gp = gpar(fill = c("red", "green", "blue"))
)