首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >堆叠直方图的代码

堆叠直方图的代码
EN

Stack Overflow用户
提问于 2016-04-11 20:21:30
回答 1查看 21关注 0票数 0

我正在尝试创建钻石价格直方图,显示切割钻石的比例。这就是我所得到的:

ggplot(aes(x = price), data = diamonds_df) +
geom_histogram(binwidth = 0.1, fill = "white", colour = "black") +
facet_wrap(~color, scales = "free_y") + 
scale_x_log10() +
ylab("Total Count") +
xlab("Diamond Price") +
ggtitle("Distribution of diamond prices for different diamond colours and cuts")

我试过使用

color = cut

而且还

fill = cut

在美学包装中,但无济于事。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36548579

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档