-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Setting norm by string doesn't work for hexbin #28105
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
Good first issue - notes for new contributorsThis issue is suited to new contributors because it does not require understanding of the We do not assign issues. Check the Development section in the sidebar for linked pull If something is unclear, please reach out on any of our communication |
I put this block after `collection.set_norm(norm) in order to call the norm's getter.
Seems to solve the issue. |
Fix: [Bug]: Setting norm by string doesn't work for hexbin #28105
To fix this issue, the code needs to be modified so that the string is converted to a proper normalization object before attempting to use it. The suggestion is to move the block of code that handles normalization ('norm') further down after it has been properly set. This block checks and attempts to autoscale norm.
updated code :
|
This was already fixed by #28106. |
Bug summary
In #20752 I added support for
imshow(..., norm="log")
, and documented that the feature is supported in particular by hexbin as well; but this doesn't actually work for hexbin, because hexbin tries to run stuff on the norm before normalizing strings.Code for reproduction
Actual outcome
Expected outcome
no error
Additional information
Probably the block
can just be moved down a bit after collection.set_norm(norm) (then we can get back the canonicalized norm from the collection). I haven't looked at how this interacts with the call to _scale_norm just below, though.
Operating system
any
Matplotlib Version
3.9.0.dev1523+g2723052176
Matplotlib Backend
any
Python version
3.12
Jupyter version
no
Installation
None
The text was updated successfully, but these errors were encountered: