ggplot 直方图(histogram)
重要的参数代码library(ggplot2)data('iris')ggplot(iris,aes(x=Sepal.Length))+geom_histogram(position = "identity",fill="lightcoral",color="black",bins=30,alpha=0.5) + xlab("Sepal Length") +theme(axis.text.y=element_text(size=12),axis.text.x=element_text(size=12),axis.line = element_line(size=0.6),axis.ticks = element_line(size=0.6),axis.ticks.length = unit(2,'mm'),axis.title = element_text(colour = "black",size=15),panel.background = element_blank())
画图结果如下所示
如果觉得《ggplot 直方图(histogram)》对你有帮助,请点赞、收藏,并留下你的观点哦!