【问题标题】:changing the range of counts in stat_binhex更改 stat_binhex 中的计数范围
【发布时间】:2013-05-23 15:37:45
【问题描述】:

我想扩大 stat_binhex 的计数范围。网站上列出的玩具示例http://docs.ggplot2.org/0.9.3.1/stat_binhex.html 在图例字段中有一个计数范围,我想扩展它。换句话说,我想让计数范围更小。

【问题讨论】:

  • 不太清楚你的意思。也许一个最小的代码示例和/或一个模型图来解释你到底想改变什么可能会有所帮助?!

标签: r ggplot2 data-visualization


【解决方案1】:

至于 bins 填充用于更改颜色,您可以使用scale_fill_continuous() 将breaks= 设置在您需要的位置。

ggplot(diamonds, aes(carat, price)) + stat_binhex() + 
         scale_fill_continuous(breaks=seq(0,6000,500))

【讨论】:

    猜你喜欢
    • 2021-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-14
    • 2020-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多