BUG: Fix NonUniformImage with nonlinear scale#27964
Merged
ksunden merged 2 commits intomatplotlib:mainfrom Apr 17, 2024
Merged
Conversation
ec55244 to
3c581ad
Compare
Contributor
Author
|
Hi, would appreciate having someone look over this PR whenever you have the chance. Thanks! |
oscargus
reviewed
Apr 15, 2024
lib/matplotlib/tests/test_image.py
Outdated
| ax.set_yscale("log") | ||
| if i == 2: | ||
| ax.set_xscale("log", base=2) | ||
| ax.set_yscale("log", base=3) |
Member
There was a problem hiding this comment.
Right now it seems like the two bottom figures are identical?
Can you change so that the x-scale has base 3 instead? In that way it may be easier to see that it actually makes a difference?
Contributor
Author
There was a problem hiding this comment.
I didn't change the logic for picking pixel centers in this PR, so changing the base doesnt alter the image visually
3c581ad to
68ba589
Compare
tacaswell
approved these changes
Apr 15, 2024
68ba589 to
919a6cb
Compare
ksunden
approved these changes
Apr 17, 2024
This was referenced Dec 21, 2024
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
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.
PR summary
Fixes a bug with NonUniformImage, where the image distorts when panning with a
nonlinear scale. Also addresses #13442, so the image correctly renders when the axes
scale changes.
Closes #27820.
PR checklist