将图例添加到venneuler

时间:2013-05-14 12:34:00

标签: r plot

我想根据图中生成的颜色为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')

0 个答案:

没有答案