利用R画Venn(文氏图、韦恩)图

213,301

[code lang="R"]
> library(VennDiagram)
Loading required package: grid
Warning message:
package 'VennDiagram' was built under R version 2.13.0
> x <- c(1,3,5,7,9,11,17,19,21,23,25,29,31,33,37,39,41,47,49,51,57,59)
> y <- c(1,3,5,7,13,17,19,21,23,25,27,29,31,33,45,47,51)
> z <- c(1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,55,57,59,61)
> venn.diagram(list(X=x,Y=y,Z=z),fill=c("red","blue","yellow"),"out.tiff")
[1] 1
[/code]

输出1表示画图成功,生成的结果是out.tiff,这个文件在你的R工作目录下。

另外推荐一个在线画venn(文氏图)的工具(可以画4个环)

http://bioinfogp.cnb.csic.es/tools/venny/index.html

评论  2  访客  2
    • fqiang1024 1

      怎么收藏文章呢

      • GFK 0

        用www.omicsbean.cn绘制venn图,没有组数限制

      发表评论

      匿名网友