You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the other day to use a binned scale where I would set the color gradient by manually picking colors, and I found myself unable to do so. (At least with only investing a moderate amount of time, reading the docs and trying a few different things.) Is there a way currently to do this? If so, could it be added to the docs? If not, could we add something like scale_fill_binned_manual() or scale_fill_binned_gradientn() for this purpose?
@thomasp85 It would be great if some minimal version of this issue could be addressed for the 3.3.4 release, as binned scales with manual color choices are likely an important feature to anybody wanting to use binned scales in practice.
I think scale_fill_stepsn() and related functions are perfectly reasonable and actually what I was looking for. So I think this issue is really about discoverability. Can we sprinkle some hints throughout the existing documentation that these functions exist? For example, refer from scale_fill_gradient() to scale_fill_steps() and vice versa. Also, add scale_fill_binned() to the pkgdown site and then from there refer to scale_fill_steps() etc.
Activity
teunbrand commentedon Apr 12, 2021
There is
scale_fill_stepsn()that parallelsscale_fill_gradientn().Created on 2021-04-12 by the reprex package (v1.0.0)
I've seen some people on SO confused over this function though. They expected the first bin to be the first colour and the last bin to be the last colour. (see for example https://stackoverflow.com/q/65627153/11374827)
I agree that
scale_fill_binned_manual()would be convenient wherein the number of bins automatically matches the length of thevaluesargument.clauswilke commentedon Apr 12, 2021
I think
scale_fill_stepsn()and related functions are perfectly reasonable and actually what I was looking for. So I think this issue is really about discoverability. Can we sprinkle some hints throughout the existing documentation that these functions exist? For example, refer fromscale_fill_gradient()toscale_fill_steps()and vice versa. Also, addscale_fill_binned()to the pkgdown site and then from there refer toscale_fill_steps()etc.