服务热线
178 0020 3020
setwd("E:/bioinformatics/fanzhimin")
library(ggplot2)
data1<-read.csv("R2-2.1.csv", header = TRUE)
data1$smoke<-factor(data1$smoke)
ggplot(data1,aes(x=bwt,fill=smoke))+geom_histogram(position="dodge",color="black",binwidth=400)+xlab("birth weight")+ggtitle("R2-36")+scale_fill_discrete(labels=c("No","Yes"))
ggplot(diamonds,aes(x=carat,color=color))+geom_line(stat="density")+xlab("price")+ggtitle("R2-36")+theme_bw()
附件