我正在使用函数draw.triple.venn()
library(VennDiagram)
绘制维恩图。这是我在R中的代码:
g = draw.triple.venn(
area1 = 4.1, area2 = 5.6, area3 = 15.9, n12 = 1.3,n23 = 4.2, n13 = 2.3, n123 = 1.2,
category = c("Land use", "Environment", "Space"), lwd = c(1.2, 1.2, 1.2), lty = c(1, 1, 1),
fill = c("darkgray", "gray", "lightgrey"), alpha = c(0.8, 0.8, 0.8),
cat.pos = c(330, 30, 150), cat.dist = c(0.06, 0.06, 0.05), sigdig=2, cex=2, cat.cex=2,
print.mode = c("raw", "percent"), cat.fontfamily = rep("serif", 3), margin = 0.01,
ind = T)
grid.arrange(gTree(children=g))
grid::grid.text("Residual variance: 80.8%", x=0.18, y=0.03, gp=gpar(col="black", fontsize=16, fontfamily="serif", fontface=1))
这是目前的数字:
我的问题是,是否可以按相对比例缩放圆圈尺寸?
这是包https://cran.r-project.org/web/packages/VennDiagram/VennDiagram.pdf
的链接非常感谢您的任何建议。
答案 0 :(得分:1)
使用库(eulerr)
VennDiag <- euler(c("A" = 1.8, "B" = 1.5, "C" = 10.6, "A&B" = 0, "B&C" = 3.0,
"A&C" = 1.1, "A&B&C" = 1.2))
plot(VennDiag, counts = TRUE, font=1, cex=1, alpha=0.5,
fill=c("grey", "lightgrey", "darkgrey"))
它有这个错误估计:
> VennDiag
original fitted residuals region_error
A 1.8 1.776 0.024 0.002
B 1.5 1.471 0.029 0.002
C 10.6 10.597 0.003 0.005
A&B 0.0 0.210 -0.210 0.011
A&C 1.1 1.158 -0.058 0.002
B&C 3.0 3.024 -0.024 0.000
A&B&C 1.2 1.145 0.055 0.003
diag_error: 0.011
stress: 0