R中欧拉图圆的坐标

coordinates for circles of euler diagram in R

我正在尝试制作这样的东西:

我的代码还在这个阶段:

不幸的是,我无法使用 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") ) 

对于您的特定情况(嵌套子集),您可以使用网格手动绘制三个圆圈。假设集合 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"))
)