Thanks to visit codestin.com
Credit goes to github.com

Skip to content

antialiased image check seems wrong when used on zoomed image #15517

Closed
@anntzer

Description

@anntzer

Bug report

Bug summary

The new antialiased image code appears to not handle zoomed images correctly.

attn @jklymak

Code for reproduction

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()

Actual outcome

Run with mpl master (or anything after #13724 was merged).

test

Expected outcome

The right image should also be rendered using "nearest" interpolation.

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 37
  • Jupyter version (if applicable): no
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions