1,R语言支持很多画图功能,现对饼状图尝试一下,可以定义一个pie.R文件内容如下ShowPie <- function(){x=c(1,2,4)pie(x, labels=c('a','b','c'),col = c('blue','red','green'),main='蛋糕分配')}命令行模式下调用2 当然也可以通过丰富的外部包来画图,例如venneuler安装venneuler包install.packages("venneuler")选择china镜像#载入venneuler包library(venneuler)vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1 ,"A&B&C"=0.1))
plot(vd)# same as c(A=1, `A&B&C`=1, C=1)
m <- data.frame(elements=c("1","2","2","2","3"), sets=c("A",&q
...
继续阅读
(8)