服务热线
178 0020 3020
data1 <- read.csv("R2-2.1.csv", header = T)
graph1 <- ggplot(data1, aes(x=bwt, fill = factor(data1$smoke)))+geom_histogram(binwidth = 400,position="dodge", color= "black") +labs(x="birth weight", y="count")+ ggtitle("R2-38")+scale_fill_brewer(palette = "Pastel1", labels = c("NO","YES"),name="Smoke")
graph2 <- ggplot(diamonds, aes(x=price, color= color))+geom_line(stat = "density",size=0.5) +xlab("price")+ ggtitle("R2-38")+theme_bw()
附件