服务热线
178 0020 3020
作业1:
> x<-c(1,1,2,3,1,5)
> y<-c("a","b","c","d","e","f")
> pie(x,labels=y,col=rainbow(3),edges=1000,clockwise=T,angle=20,radius=0.9,density=NULL,border="black",main="pie chart")
>
作业2:
> library('plotrix')
> x<-c(10,20,30,40,50,60)
> y<-c("a","b","c","d","e","f")
> pie3D(x,labels=y,height=0.7,explode=0.1,main="pie 3D chart")
>
作业3:
> A=1:150
> B=c(100:200,300:400)
> C=c(50:60,80:90)
> 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,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)
>
附件