Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display elements, instead of just counts, within each circle of a Venn diagram?

For example, set A={a,b,c} and set B={b,c,d} and the intersection of sets A and B should be {b,c}.

But how can I display {b,c} instead of the count 2 in a Venn diagram? I tried venn in the limma package and Venn in the Vennerable package but neither works.

like image 376
gipelttil Avatar asked Nov 17 '25 09:11

gipelttil


1 Answers

It's possible in Vennerable using the FaceText="elements" option, though its documentation is incomplete. Using the example from page 10 of Venn.pdf (available once the package is installed):

setList <- strsplit(month.name, split = "")
names(setList) <- month.name
Vmonth3 <- VennFromSets(setList[1:3])
plot(Vmonth3,doWeights=FALSE,show=list(FaceText="elements"))

It's also possible to control the appearance of the elements. For example, this code sets the font size to 10:

gp <- VennThemes(compute.Venn(Vmonth3))
gp$FaceText <- lapply(gp$FaceText,function(x) {x$fontsize<-10; return(x)})
plot(Vmonth3,doWeights=FALSE,show=list(FaceText="elements"),gp=gp)
like image 175
dpmcna Avatar answered Nov 19 '25 23:11

dpmcna