Skip to content

FIX: fix anti-aliasing zoom bug - #15519

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
jklymak:fix-anti-aliasing
Oct 25, 2019
Merged

tacaswell merged 1 commit into
matplotlib:masterfrom
jklymak:fix-anti-aliasing

Conversation

@jklymak

@jklymak jklymak commented Oct 25, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Closes #15517.

This failed the new test on master, and passes now.

The test from #15517 yields:

fix

from pylab import *
plt.rcdefaults()
fig, axs = plt.subplots(1, 2)
axs[0].imshow(np.random.rand(10, 10))  # now defaults to interpolation="antialiased"
axs[1].imshow(np.random.rand(1000, 1000))
axs[1].set(xlim=(-.5, 9.5), ylim=(-.5, 9.5))
plt.show()

and it works under interactive use as far as I can see.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak added topic: images Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labels Oct 25, 2019
@jklymak jklymak added this to the v3.2.0 milestone Oct 25, 2019
@jklymak

jklymak commented Oct 25, 2019

Copy link
Copy Markdown
Member Author

ping @ivanov and @tacaswell this should go in before 3.2 is released (once approved of course)

Comment thread lib/matplotlib/image.py Resolved

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modulo ci (at least one style fix)

@tacaswell
tacaswell merged commit 3956e74 into matplotlib:master Oct 25, 2019
@tacaswell

Copy link
Copy Markdown
Member

Thank you for the prompt fix!

@jklymak

jklymak commented Oct 25, 2019

Copy link
Copy Markdown
Member Author

No problem, that would have been pretty bad to get out in the wild. Thanks to @anntzer for catching it...

jklymak added a commit that referenced this pull request Oct 25, 2019
…519-on-v3.2.x

Backport PR #15519 on branch v3.2.x (FIX: fix anti-aliasing zoom bug)
@jklymak
jklymak deleted the fix-anti-aliasing branch October 25, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

antialiased image check seems wrong when used on zoomed image

3 participants