Search code examples
rvenn-diagram

Triple venn-diagram in R: How to get proportions of the area right


I am trying to compare different test methods using venn diagrams in R by using the package VennDiagram. I run into the problem that areas are not proportional to the size of the numbers. It all works nicely then I compare 2 test-methods as follows:

draw.pairwise.venn(44, 32, 28, c("TestA", "TestB"), fill = c("red", "blue"))

But, when I try to compare 3 methods, the areas are not proportional anymore. I have tried to add some "extras" like eulerr.d = TRUE and scaled = TRUE, but don't seem to help.

draw.triple.venn(44, 39, 32, 39, 25, 28, 25, c("TestA", "TestC", "TestB"),  fill = c("red", "green", "blue"), euler.d = TRUE, scaled = TRUE)

Any tips on how to get around this?

Thank you in advance,

Bjorn


Solution

  • Neither Venn nor Euler diagrams require overlap areas to be proportional to magnitude of content, tho' I understand it makes the graph marginally more useful. I strongly recommend investigating the package UpSetR which provides some really cool, and instructive graphic representations of set overlaps.

    In the meantime, I would go with user20650's suggestion to play with eulerr and see if you find it easier to get the overlay plot you want. Also at CRAN: bvenn, venneuler, vennplot, and several other packages of possible interest.

    Side nit: If you are only plotting overlaps with content, then it's an Euler, not Venn diagram.