服务热线
178 0020 3020
library(ggplot2)
a<-read.csv('e:/R学习小组/2/R2-2.1.csv');a
ggplot(a,aes(x=bwt,fill=factor(smoke)))+geom_histogram(binwidth=400,color='black',position='dodge')+ggtitle('R2-24')+xlab('birth weight')+scale_fill_discrete(labels=c('no','yes'))
ggplot(diamonds,aes(x=carat,color=color))+geom_line(stat="density")+xlab("price")+ggtitle("R2-24")+theme_bw()
附件