-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
In LogTransform, clip after log, not before. #9477
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
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
07a9450
In LogTransform, clip after log, not before.
anntzer def5e9a
MNT: move log mask vs clip setting lower
tacaswell 6357245
MNT: add exception for invalid kwargs to LogScale
tacaswell 746d466
TST: add test for clip and masking of negative values on log scale
tacaswell 0f9c6fb
DOC: add API changes notes
tacaswell b81b323
API: let loglog, semilogx, semilogy defer to default nonpos behavior
tacaswell e3b777f
API/TST: update test image for new log clipping behavior
tacaswell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
In LogTransform, clip after log, not before.
When clipping before taking the log, the clip value in the output array cannot be beyond log(epsilon) ~ -300. When clipping after taking the log, the clip value can be much further (see comments regarding choice of value). This allows setting the default nonpos mode back to "clip". Some test images had to be updated as this effectively moves the position of the "clip point", slightly changing the slope of the line that goes to that point and thus the rasterization (by a tiny amount).
- Loading branch information
commit 07a9450b407ee5dc89b82e388840d510b009ef3e
There are no files selected for viewing
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
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
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
Binary file modified
BIN
-3.32 KB
(75%)
lib/matplotlib/tests/baseline_images/test_axes/log_scales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.6 KB
(78%)
lib/matplotlib/tests/baseline_images/test_scale/logscale_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why mask here instead of 'clip' like semilogx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because typo. But actually both should be using "mask" mode if we want to keep backcompatibility (that's what we had before). Feel free to push either option (but it seems normal to return to the 2.0.1 behavior for now).