-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Issue with scale_color_manual #4616
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
Comments
I think because the limits are taken from the names of the |
Sure @teunbrand - that makes sense in terms of current behavior - but it represents a change from prior versions of |
Ah, I see: apologies for my misinterpreting the issue. I think the change is a consequence of the following point documented in the 3.3.4 release note:
The functional change that was introduced is in the following lines: Lines 135 to 137 in ffcfaf7
Since the |
Thanks for flagging the cause and submitting a PR, @teunbrand! |
Should be fixed by #4619 |
thanks for the update @yutannihilation - I'll test this out tonight! |
Worked great - thanks @yutannihilation and @teunbrand! |
Thanks for confirming! |
I have just updated to the most recent
ggplot2
version (somewhat belatedly) and have noticed a change in howscale_colour_manual
behaves. This seems along the same lines as #4511 but with a different issue.The reprex below generates a plot where the legend order follows the values of y for the most recent date. This works as expected plot 1 below, where
scale_colour_brewer
is used to define the palette.Until I upgraded
ggplot2
, I had the same result withscale_colour_manual
. Now, however, the legend items are ordered alphabetically instead. This is reproduced in plot 2 below.I can't find anything to suggest that this was an intended change - apologies if I have missed that. I really appreciate folks taking a look at this and helping sort out what is going on here!
Created on 2021-09-14 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: