Is it possible to create a proportional triple Venn Diagram

☆樱花仙子☆ 提交于 2019-12-13 07:32:52

问题


I am trying to create a proportional Venn Diagram with three groups. I searched the web and tried with 3 different packages: Venndiagram, venneuler and eulerr. However, with none it seems that it creates a correct proportional diagram. Can anyone help how to do this?

I tried with Venndiagram package:

library(Venndiagram)
draw.triple.venn(58, 44, 37, 44, 27, 37, 27, c("A", "B", "C"), euler.d = TRUE, scaled = TRUE)

Although scaled = TRUE, this gave me the following diagram:

When using venneuler package:

library(venneuler)
v <- venneuler(c(A = 4, B = 0, C = 0, "A&B" = 10, "A&C" = 17, "B&C" = 0, "A&B&C" = 27))
plot(v)

This seemed to work better. However, as you can see, there is an area of B and C outside of A although this needs to be 0. Maybe this is impossible with circles?


回答1:


You are right, it is impossible with circles. However, if you're willing to use ellipses instead, the latest development version of eulerr (that I happen to the be creator of) can help you.

devtools::install_github("jolars/eulerr")

v <- eulerr::euler(c(A = 4, B = 0, C = 0,
                     "A&B" = 10, "A&C" = 17, "B&C" = 0, "A&B&C" = 27),
                   shape = "ellipse")
plot(v)

yields

Which is a perfect fit.

      original fitted residuals regionError
A            4      4         0           0
B            0      0         0           0
C            0      0         0           0
A&B         10     10         0           0
A&C         17     17         0           0
B&C          0      0         0           0
A&B&C       27     27         0           0

diagError: 0 
stress:    0 


来源:https://stackoverflow.com/questions/46849802/is-it-possible-to-create-a-proportional-triple-venn-diagram

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!