例如绘制韦恩图:
library(Vennerable) data(StemCell) w <- Venn(Sets=StemCell[1:2]) plot(w, type="squares")
自行修改颜色,当然type还有"circles","squares","triangles","ellipses","AWFE","ChowRuskey","AWFE".类型包括圆形,椭圆形等,这里绘制的是方形的维恩图,修改颜色代码如下,多维的以此类推:
w <- compute.Venn(Venn(Sets=StemCell[1:2]), type ="squares") gp <- VennThemes(w) gp[["Face"]][["11"]]$fill <-"brown" gp[["Face"]][["01"]]$fill <-"green" gp[["Face"]][["10"]]$fill <-"red" plot(w, gp = gp)
得到结果:
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!