Manually assigning colors with scale_fill_manual only works for certain hexagon sizes

前端 未结 1 1023
梦如初夏
梦如初夏 2021-02-15 07:49

I am trying to create a scatterplot that is summarized by hexagon bins of counts. I would like the user to be able to define the count breaks for the color scale. I have this wo

相关标签:
1条回答
  • 2021-02-15 08:38

    you can define colors in 'geom' instead of 'scale' that modifies the scale of plot:

    ggplot(hexdf, aes(x = x, y = y)) + 
    geom_hex(stat = "identity",fill =hexdf$countColor)
    
    0 讨论(0)
提交回复
热议问题