-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cast vmin/vmax to floats before nonsingular-expanding them. #16344
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #16344 +/- ##
==========================================
- Coverage 80.86% 80.79% -0.08%
==========================================
Files 307 307
Lines 75689 75696 +7
Branches 9679 9679
==========================================
- Hits 61208 61159 -49
- Misses 11944 11995 +51
- Partials 2537 2542 +5
Continue to review full report at Codecov.
|
Not sure why codecov posted a comment on this PR :/ |
timhoffm
reviewed
Jan 28, 2020
Nonsingular-expansion is fundamentally about adding small floats to separate vmin/vmax so casting to float is normal; this avoids running into plain wrong autoscales with ``` im = imshow([[np.int16(-20000), np.int16(20000)]]) colorbar() print(im.norm.vmin, im.norm.vmax) ``` or ``` im = imshow([[np.int16(-32768), np.int16(0)]]) colorbar() print(im.norm.vmin, im.norm.vmax) ``` (The bug is present as far back as 2.2.0.)
tacaswell
approved these changes
Jan 28, 2020
jklymak
approved these changes
Jan 28, 2020
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jan 29, 2020
…ular-expanding them.
timhoffm
added a commit
that referenced
this pull request
Jan 29, 2020
…344-on-v3.2.x Backport PR #16344 on branch v3.2.x (Cast vmin/vmax to floats before nonsingular-expanding them.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nonsingular-expansion is fundamentally about adding small floats to
separate vmin/vmax so casting to float is normal; this avoids running
into plain wrong autoscales with
(note the extra expansion above 20000 and below -20000, which is not normally not present)
or
(note the completely wrong colormapping)
(The bug is present as far back as 2.2.0. This would be somewhat nice to have in 3.2, but I'm not insisting on it either.)
PR Summary
PR Checklist