Search code examples
rvenn-diagramgplots

How can I make the Venn-Diagram colourful in R {venn-gplots}?


I used venn function in gplots library.

here is a simple example.

library(gplots)
venn( list(A=1:5,B=4:6,C=c(4,8:10),D=c(4:12)) )

and here is the output:

enter image description here

my question is how can I make this picture colourful for each group? (basically make it more fancy! :D)

I've tried another packages but as my data are not numeric they would not accept characters to make a diagram!

Any help/advise would be appreciated. Thanks in advance,


Solution

  • Either export your image as svg and colorize it with - e.g. - InkScape, or use another package:

    require(VennDiagram)
    vp <- venn.diagram(list(A=1:5,B=1,C=c(4,8:10),D=c(4:12)), 
                       fill = 2:5, alpha = 0.3, filename = NULL);
    grid.draw(vp)
    

    enter image description here