-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scale_color_gradient2 doesn't entirely respect limits argument #2230
Comments
Thanks for opening this issue and including an example. Would you mind including the plot images as well? The reprex package can help streamline this. |
I think the issue is to do with the However, the If you set the Some possible solutions (from least to most conservative):
|
If
midpoint
is not half-way between the two values inlimits
, then the gradient scale extends beyond the limit that is closer tomidpoint
but the guide stops wherelimits
specifies. Especially in conjunction withna.value
, this can mislead the reader.In this plot the color scale goes below what the guide displays, and values below 2 are not indicated as
NA
.If we change
midpoint
to3
, then the scale truly runs from 2 to 6 and values below 2 areflagged.
The text was updated successfully, but these errors were encountered: