I am using the Vennerable package to draw Venn diagrams.
library(Vennerable)
A <- c("aa","ab","ac","a1")
B <- c("bb","ab","bc")
C <- c("ac","bc","cc","aa")
L <- list(A=A,B=B,C=C)
V <- Venn(L)
I am aware that I can manipulate the font size for the "elements" with
gp <- VennThemes(compute.Venn(V))
gp$FaceText <- lapply(gp$FaceText,function(x) {x$fontsize<-10; return(x)})
plot(V ,doWeights=FALSE,show=list(FaceText="elements"),gp=gp)
Unfortunately, the elements' label text is put into the sets without space or comma ("aaac" instead "aa, ac"). See graph below. Is there any way to change this?
Furthermore, how can I introduce a line break into the elements' labels if I have many items (more than just 2 as in the case below (aa ac)? I believe a function like
linebreak <- function(x,...){
gsub('(.{1,15})(\\s|$)', '\\1\n', x)}
could help. But how would I integrate it into the Vennerable plot code?
Unfortunately, there isn't any pertaining information in the documentation of the package.
Many thanks.