-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Colormap + NoNorm only plots one color under matplotlib
3.5.0
#21870
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
This definitely is a regression, sorry about that. This bisects back to 146856b / #20054 which is part of an on going effort to make the colorbar code "less special" and hence easier to maintain and work with, unfortunately it looks like then special path for handling I'll see if I can make any progress on sorting this out, but this may need attention from @jklymak. |
Closes matplotlib#21870 This adds another special-case path for NoNorm and tweaks the contents of another. These special-cases are required because NoNorm (like BoundaryNorm) has a different return value than ever other Norm (it directly returns integers to index into the LUT rather than [0, 1] that is later mapped into the LUT.
Yes, sorry we broke this. Some of colorbars' features were completely untested, so we are finding lots of things dropped in 3.5.0. We will try and have all reported ones squashed by 3.5.1.... |
Closes matplotlib#21870 This adds another special-case path for NoNorm and tweaks the contents of another. These special-cases are required because NoNorm (like BoundaryNorm) has a different return value than ever other Norm (it directly returns integers to index into the LUT rather than [0, 1] that is later mapped into the LUT. Co-authored-by: Jody Klymak <[email protected]>
Closes matplotlib#21870 This adds another special-case path for NoNorm and tweaks the contents of another. These special-cases are required because NoNorm (like BoundaryNorm) has a different return value than ever other Norm (it directly returns integers to index into the LUT rather than [0, 1] that is later mapped into the LUT. Co-authored-by: Jody Klymak <[email protected]>
Bug summary
My aim is to plot a colormap with e.g. 5 discrete colors (with 5 ticks centered per color).
Under
matplotlib
3.4.3, I got this working with the code snippet below usingNoNorm
; under 3.5.0, only one color is plotted.Is this a bug - or is my setup incorrect/unidiomatic and worked only by chance before?
Code for reproduction
Actual outcome
This is the output under
matplotlib
3.5.0.Expected outcome
This was the output under
matplotlib
3.4.3.Additional information
No response
Operating system
Ubuntu
Matplotlib Version
3.5.0
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
Python 3.9.7
Jupyter version
3.2.4
Installation
conda
The text was updated successfully, but these errors were encountered: