失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > ggplot 直方图(histogram)

ggplot 直方图(histogram)

时间:2020-10-12 10:15:04

相关推荐

ggplot 直方图(histogram)

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)》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。