饼形图及扇型图
2019獨角獸企業重金招聘Python工程師標準>>>
- pie()
x:非負數向量,表示面積
labels:各扇形標簽的字符型向量
例
#如下圖 par(mfrow=c(2,2)) slices <- c(10, 12,4, 16, 8) lbls <- c("US", "UK", "Australia", "Germany", "France")pie(slices, labels = lbls, main="Simple Pie Chart")pct <- round(slices/sum(slices)*100) lbls <- paste(lbls, pct) lbls <- paste(lbls,"%",sep="") pie(slices,labels = lbls, col=rainbow(length(lbls)),main="Pie Chart with Percentages")library(plotrix) pie3D(slices, labels=lbls,explode=0.1,main="3D Pie Chart ")mytable <- table(state.region) lbls <- paste(names(mytable), "\n", mytable, sep="") pie(mytable, labels = lbls, main="Pie Chart from a dataframe\n (with sample sizes)")par(opar)?
- 扇形圖
?
?
轉載于:https://my.oschina.net/u/1785519/blog/1563077
總結
- 上一篇: “物联网”“云计算” IT业新概念风起云
- 下一篇: 神经网络对比