【发布时间】:2016-04-11 12:21:29
【问题描述】:
我正在尝试创建钻石价格的直方图,以显示钻石切割的比例。这是据我所知:
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
在美学包装内但无济于事。
【问题讨论】: