-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: don't round image sizes to pixel if meant to be unsampled #25704
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
Conversation
d766d7d
to
e720b63
Compare
they are meant to be unsampled
eadeb74
to
6704bff
Compare
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.
I haven't checked, but maybe make sure that all of the now modified images have style='mpl20'
?
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 😀 |
Yes, it for sure make sense during the review to use the same style. Was more thinking of the overall goal from #24716 |
Hopefully it will be moot when @tacaswell finishes his procedure for keeping track of image changes |
@meeseeksdev backport to v3.7.x |
…f meant to be unsampled
…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)
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
pytest
passes)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.rst
ornext_api_changes/README.rst