-
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
Inconsistent colours in filled contour plot #4268
Comments
A workaround for this is to specify a scale with
So I suppose a fix would be to default to |
Honestly, I don't think this is a bug. Discrete scales drop empty factor levels by default, and you can set |
I think it's a workaround, not a solution, unless there's a way to specify |
I agree with this statement, but it's a more general problem than the one encountered here. You also encounter it when you want to, for example, change the labels that go with certain breaks in a scale. You can only do that by explicitly calling a scale function, and to do that you need to know which scale function to call. This has been bugging me for a while, and I'd like to fix it in a general way, but it's non-trivial. |
See e.g. here: #3973 (comment) |
I'm closing this in favor of #4269, which describes the general problem. |
This bug was reported in https://stackoverflow.com/q/64873086/2554330 where the user couldn't get colours consistent across two graphs. Code here is basically what was posted there.
Notice that neither graph lists all bins between the specified breaks, and they are inconsistent about assigning colours to corresponding bins, most obviously at the top end where the first graph leaves out 2 bins and the bottom graph leaves out one.
What I would expect is that if the
breaks
are specified explicitly, the colour would depend on the specified bins, not just the non-empty ones.The text was updated successfully, but these errors were encountered: