我想根据图中生成的颜色为Venneuler ven图添加一个图例。如何生成相应的图例?是否也可以在Ven中绘制值?
List1 <- c("102","148","211","293","296","405")
List2 <- c("102","148")
Lists <- list(List1,List2)
items <- sort(unique(unlist(Lists)))
MAT <- matrix(rep(0,length(items)*length(Lists)), ncol=3)
colnames(MAT) <- c("A","B")
rownames(MAT) <- items
lapply(seq_along(Lists), function(i){
MAT[items %in% Lists[[i]],i] <<- table(Lists[[i]])
})
MAT
library(venneuler)
v <- venneuler(MAT > 0)
plot(v,main='R simple plot')