xxxxxxxxxx
print(r.eval("""
options(bitmapType='cairo'); fn<-'Rplots.png'
png(fn,pointsize=12,bg='whitesmoke')
library(ggplot2)
theme_set(theme_bw())
ggplot(economics,aes(x=date,y=psavert))+
geom_area(fill='steelblue',color='slategray',cex=.3,alpha=.7)+
labs(title='Personal Savings Rate',
x='date',y='personal savings rate')+
theme(axis.text.x=element_text(size=4,angle=15,vjust=.5),
axis.text.y=element_text(size=4,hjust=.5),
title=element_text(size=5,color='slategray'))
ggsave(fn,width=2.1,height=1.5)
dev.off()"""))
No comments:
Post a Comment