FIX: don't round image sizes to pixel if meant to be unsampled#25704
Merged
ksunden merged 1 commit intomatplotlib:mainfrom Apr 25, 2023
Merged
FIX: don't round image sizes to pixel if meant to be unsampled#25704ksunden merged 1 commit intomatplotlib:mainfrom
ksunden merged 1 commit intomatplotlib:mainfrom
Conversation
d766d7d to
e720b63
Compare
they are meant to be unsampled
eadeb74 to
6704bff
Compare
oscargus
approved these changes
Apr 17, 2023
Member
Author
|
I think for review send posterity it probably makes sense to leave the images in the style they are already in? It's pretty easy to see they are only trivially changed whereas if we changed the colormaps they would change a lot. I think the style changes are minimal for these ones anyway - just colormaps for instance. While I appreciate there are those who hate jet, it's probably OK for testing 😀 |
Member
|
Yes, it for sure make sense during the review to use the same style. Was more thinking of the overall goal from #24716 |
Member
Author
|
Hopefully it will be moot when @tacaswell finishes his procedure for keeping track of image changes |
ksunden
approved these changes
Apr 25, 2023
2 tasks
Member
|
@meeseeksdev backport to v3.7.x |
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jun 28, 2023
…f meant to be unsampled
QuLogic
added a commit
that referenced
this pull request
Jun 29, 2023
…704-on-v3.7.x Backport PR #25704 on branch v3.7.x (FIX: don't round image sizes to pixel if meant to be unsampled)
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.
Closes #8981
PR Summary
For images we do some pixel rounding, but if we are doing unsampled images (eg
imshow(..., interpolation='none')) and saving to a backend that allows rasters (svg, pdf), then we don't want to do the pixel rounding - that just makes the image sizes fractionally too large when that isn't needed at all if we don't resample.All the test images that changed just model my a pixel, and all have
imshow(..., interpolation='none').Old
New
code
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst