@Macux
2015-12-01T06:47:07.000000Z
字数 522
阅读 922
R语言_学习笔记
> ggplot(uspopage,aes(Year,Thousands,fill=AgeGroup)) + geom_area(size=0.2,alpha=0.4) + scale_fill_brewer(palette="Blues") + guides(fill=guide_legend(reverse=TRUE)) + geom_line(position="stack",size=0.2)
> clim <- subset(climate,Source=="Berkeley",select=c("Year","Anomaly10y","Unc10y"))
> ggplot(clim,aes(Year,Anomaly10y)) + geom_ribbon(aes(ymin=Anomaly10y-Unc10y,ymax=Anomaly10y+Unc10y),fill="orange",alpha=0.2,guide=FALSE) + geom_line(color="steelblue")
#geom_ribbon()必须在geom_line()之前调用。