标签:os io ar on c file ip ca list
install.packages("VennDiagram")
library(VennDiagram)
A = 1:150
B = c(121:170,300:320)
C = c(20:40,141:200)
Length_A<-length(A)
Length_B<-length(B)
Length_C<-length(C)
Length_AB<-length(intersect(A,B))
Length_BC<-length(intersect(B,C))
Length_AC<-length(intersect(A,C))
Length_ABC<-length(intersect(intersect(A,B),C))
T<-venn.diagram(list(A=A,B=B),filename=NULL
,lwd=1,lty=2
,col=c(‘red‘,‘green‘),fill=c(‘red‘,‘green‘)
,cat.col=c(‘red‘,‘green‘)
,rotation.degree=90)
grid.draw(T)
T<-venn.diagram(list(A=A,B=B,C=C),filename=NULL
,lwd=1,lty=2,col=c(‘red‘,‘green‘,‘blue‘)
,fill=c(‘red‘,‘green‘,‘blue‘)
,cat.col=c(‘red‘,‘green‘,‘blue‘)
,reverse=TRUE)
grid.draw(T)
library(VennDiagram)
draw.pairwise.venn(area1=Length_A,area2=Length_B,cross.area=Length_AB
,category=c(‘A‘,‘B‘),lwd=rep(1,1),lty=rep(2,2)
,col=c(‘red‘,‘green‘),fill=c(‘red‘,‘green‘)
,cat.col=c(‘red‘,‘green‘) )
library(VennDiagram)
draw.triple.venn(area1=Length_A, area2=Length_B, area3=Length_C
,n12=Length_AB, n23=Length_BC, n13=Length_AC, n123=Length_ABC
,category = c(‘A‘,‘B‘,‘C‘)
,col=c(‘red‘,‘green‘,‘blue‘),fill=c(‘red‘,‘green‘,‘blue‘)
,cat.col=c(‘red‘,‘green‘,‘blue‘)
,reverse = FALSE)
library(VennDiagram)
draw.pairwise.venn(area1=2000,area2=200,cross.area=20
,category=c(‘A‘,‘B‘),lwd=rep(1,1),lty=rep(2,2)
,col=c(‘red‘,‘green‘),fill=c(‘red‘,‘green‘)
,cat.col=c(‘red‘,‘green‘) )
标签:os io ar on c file ip ca list
原文地址:http://www.cnblogs.com/emanlee/p/3931831.html