服务热线
178 0020 3020
data1<-read.csv(“R2-2.1.csv”,header=T)
ggplot(data1,aes(x=bwt,fill=factor(data1$smoke)))+geom_histogram(binwidth=400,color=”black”,position = “dodge”)+labs(xlab=”birth weight”,title=”R2-35)+scale_fill_discrete(h=c(0,200),c=400,name=”smoke”,lables=c(“yes”,”no”)
ggplot(diamonds,aes(x =carat,color = color))+geom_density(size =2)+ ylab("density")+xlab('price')+ggtitle(“R2-35")
附件