Skip to content

Image interpolation wrong for pixel values exceeding vmax  #8631

Closed
@geggo

Description

@geggo

Bug report

Bug summary

With imshow(), image interpolation gives wrong results near pixels with values exceeding vmax. A large rectangular region (given by the interpolation kernel size) is filled with color corresponding to maximum value.

Code for reproduction

t = zeros((50, 50))
t[10, 10] = 1
t[10, 20] = 2
imshow(t, vmin=0, vmax=1, interpolation='lanczos')

see gist

Actual outcome

download 2

Expected outcome

Ok with matplotlib 2.0.0

download

Matplotlib version

  • Operating System: macOS
  • Matplotlib Version: 2.0.1, 2.0.2
  • Python Version: 2.7
  • Jupyter Version (if applicable):
  • Other Libraries:

matplotlib installed via conda-forge

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions