Search code examples
rgraphicsvenn-diagram

Nice looking five sets Venn diagrams in R


In a paper I recently came across a nice 5 sets Venn diagram:

enter image description here

Would anyone know how to code producing such Venn diagram displays in R?

Most of the packages I looked at seem to produce the less clear version

enter image description here

Any thoughts?

EDIT: seems the Nature article used this web tool: http://bioinformatics.psb.ugent.be/webtools/Venn/ might still be nice to port it to some R package, especially the asymmetric Venns, which are currently not available in any package that I know of


Solution

  • For the record Adrian Dusa made a really nice new R package venn that makes Venn diagrams as above, for up to 7 sets :

    library(venn)
    venn(5, ilab=TRUE, zcolor = "style")
    

    enter image description here

    venn(7, ilab=TRUE, zcolor = "style")
    

    enter image description here

    Thanks Adrian for the cool package!

    For many sets an UpSet plot might be easier to read though: https://github.com/hms-dbmi/UpSetR

    enter image description here

    And there is now also a newer R package ggVennDiagram that can do both types of plots for 2-7 sets!