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

Skip to content

[Bug]: interpolation_stage="rgba" does not respect array-alpha #28382

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

Closed
anntzer opened this issue Jun 12, 2024 · 1 comment · Fixed by #28437
Closed

[Bug]: interpolation_stage="rgba" does not respect array-alpha #28382

anntzer opened this issue Jun 12, 2024 · 1 comment · Fixed by #28437

Comments

@anntzer
Copy link
Contributor

anntzer commented Jun 12, 2024

Bug summary

Passing interpolation_stage="rgba" to imshow() results in array-valued alphas being ignored.

Code for reproduction

from pylab import *

im = arange(9).reshape(3, 3)
alpha = linspace(0, 1, 9).reshape(3, 3)

subplot(121).imshow(im, alpha=alpha)  # interpolation_stage="alpha"
subplot(122).imshow(im, alpha=alpha, interpolation_stage="rgba")
show()

Actual outcome

Figure_1

Expected outcome

Same image on left and right (interpolation_stage should not matter at all here.

Additional information

No response

Operating system

macos

Matplotlib Version

3.10.0.dev260+g7275ad95ff

Matplotlib Backend

qtagg

Python version

3.12

Jupyter version

no

Installation

git checkout

@chaoyihu
Copy link
Contributor

Thanks for raising this issue. The problem is with _ImageBase::_make_image where alpha is written as a scalar when interpolation_stage='rgba'.

I have submitted #28437 which will hopefully resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants