-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Fix misaligned colors in colorbar? #4618
Conversation
Seems fine to me. The plot colormapping code should always consider colorrange so I don't see why Colorbar shouldn't. With the ColorMapping type being constructed, the colorrange should also always be in a standard form. I would say this can be merged after adding a release note to https://github.com/MakieOrg/Makie.jl/blob/master/CHANGELOG.md and adding a reference image test probably in https://github.com/MakieOrg/Makie.jl/blob/master/ReferenceTests/src/tests/figures_and_makielayout.jl. |
I think I did what you asked:
I also "fixed" formatting (spacing around kwarg Please let me know if I missed something! |
I'm not sure how/where to upload the reference image for the added reference test. Could you help with that? |
That's something Simon, Julius or I need to do. |
Is there anything else I need to do? |
Description
Fixes #4121?
Currently the
Colorbar
built from acontourf
may have misaligned colors. For a MWE see #4121 orwhich produces this misalignment (I edited the image in Preview to show the differences in colors):
The issue seems to be that the
continuous_pixels
(used to draw the heatmap for the colorbar) are not scaled properly. Simply adding thecolorrange
kwarg to that call fixes this issue for me, with properly matching colors:However, I'm not if this breaks other things elsewhere, so hopefully someone can hold my hand to finish this PR?
Type of change
Delete options that do not apply:
Checklist