服务热线
178 0020 3020
library(ggplot2)
mydata<-read.csv(file.choose(1))
mydata$smoke <- factor(mydata$smoke)
ggplot(mydata,aes(x=bwt,fill=smoke))+geom_histogram(position="dodge",binwidth=400,color="black")+xlab("birth weight")+ggtitle("R2-09")+scale_fill_discrete(labels=c("No","Yes"))
ggplot(diamonds,aes(x=carat,color=color))+geom_line(stat="density")+xlab("price")+ggtitle("R2-09")+theme_bw()
library(ggplot2)
ggplot(diamonds,aes(x=carat,color=color))+geom_line(stat="density")+xlab("price")+ggtitle("R2-09")+theme_bw()
附件