Venn diagram proportional and color shading with semi-transparency

Solution 1:

Here is a post which discusses Venn diagram from list of clusters and co-occurring factors.

For easy solution use package venneuler:

require(venneuler)
v <- venneuler(c(A=450, B=1800, "A&B"=230))
plot(v)

enter image description here

For more advanced and customized solutions check package VennDiagram.

library(VennDiagram) 
venn.diagram(list(B = 1:1800, A = 1571:2020), fill = c("lightblue", "green"), 
             alpha = c(0.5, 0.5), lwd =0, "venn_diagram.tiff")

enter image description here

Solution 2:

I have recently published a new R package, eulerr, which does what you want. It is quite similar to venneuler but without its inconsistencies.

library(eulerr)
fit <- euler(c(A = 450, B = 1800, "A&B" = 230))
plot(fit)

eulerplot

Or you could try the shiny application for the same r package at eulerr.co

shiny-euler

Solution 3:

Based on second answer by Geek On Acid second suggestion ( thanks once again ) I would able sove the line problem as well. I am posting if this is relevent to other googlers !

  require(VennDiagram)
    venn.diagram(list(B = 1:1800, A = 1571:2020),fill = c("red", "green"),
  alpha = c(0.5, 0.5), cex = 2,cat.fontface = 4,lty =2, fontfamily =3, 
   filename = "trial2.emf");

enter image description here

Solution 4:

Even though this doesnt answer your question completely. I thought that this will be useful for other people looking to plot Venn Diagram. One can use the venn() function from the gplots package: http://www.inside-r.org/packages/cran/gplots/docs/venn

## modified slightly from the example given in the documentation
## Example using a list of item names belonging to the
## specified group.
##
require(gplots) 
## construct some fake gene names..
oneName <- function() paste(sample(LETTERS,5,replace=TRUE),collapse="")
geneNames <- replicate(1000, oneName())

## 
GroupA <- sample(geneNames, 400, replace=FALSE)
GroupB <- sample(geneNames, 750, replace=FALSE)
GroupC <- sample(geneNames, 250, replace=FALSE)
GroupD <- sample(geneNames, 300, replace=FALSE)

venn(list(GrpA=GroupA,GrpB=GroupB,GrpC=GroupC,GrpD=GroupD))

enter image description here Afterwards I just add colours and transparency using illustrator. enter image description here