在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Summary: 1.绘制饼图:
x<- c(1,2,3,4) labs0<-c("A","B","C","D") pie(x,labels = labs0, main = "A simple Piechart") 更改一下颜色设置: pie(x,labels = labs0, main = "A simple Piechart",col = rainbow(4)) #rainbow被解析成了4种颜色
require("plotrix") user_num01<-c(nrow(less50),nrow(g50_100),nrow(g100_500),nrow(g500_1k),nrow(g1k_5k), nrow(g5k_10w),nrow(more10w)) ranges01<-c("<=50","50-100","100-500","500-1K","1K-5K","5K-100K",">100K") x1<-as.numeric(user_num01) lbls<-paste(ranges0,"\n",round(x1/sum(x1)*100,2),"%",sep = "") pie3D(x1,labels = lbls,labelcex=0.92,col = color0,explode = 0.08,border = F, main = "Daily User Access Counts ...") |
请发表评论