服务热线
178 0020 3020
data1<-read.csv(file.choose()) library(ggplot2) ggplot(data1,aes(x=bwt,fill=factor(data1$smoke)))+ geom_histogram(binwidth=400,position="dodge",color="black")+ ggtitle("R2-13")+xlab("birthweight")+ scale_fill_discrete(h=c(0,200),c=400,name="Smoke",labels=c("No","Yes"))
data(diamonds) library(ggplot2) ggplot(diamonds,aes(x=carat,color=color))+ geom_line(stat="density")+ ggtitle("R2-13")+xlab("price")+theme_bw()
附件