ggplot2绘制面积图
ggplot2绘制面积图的代码格式:
ggplot(sunspotyear, aes(x,y))+ geom_area()
绘制面积图,文件格式如下:
#draw simple...sunspotyear, aes(Year,Sunspots))+
geom_area(fill="blue", alpha=.2) +
geom_line()
按分组作图,文件格式如下:
library(ggplot2...=20)
pie(data$Value, labels=data$Group, radius=0.8, clockwise=T, init.angle=90, density=20, col=rainbow...0,0,0,0))
#first start with 10
pie(rep(1,10), col=rainbow(10), lty=0, labels='', init.angle=90, border=NA...language
par(mar=c(0,0,0,0))
pie(rep(1,2000), col=rainbow(2000), lty=0, labels='', init.angle=90, border=NA