You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Setting alpha with an array is ignored with jupyterlab %inline backend #29595
Worked with Matplotlib 3.9.4 with numpy 2.2.1
Fails in matplotlib 3.10.0 (same numpy), running in a Jupyter Lab cell.
Worked as expected when run from the command line, with backend 'macosx', or if %matplotlib osx or %matplotlib ipympl is used to decorate the cell before running the code above.
We need to clarify what the intended behavior for array alpha kwarg is on RGBA images. This is the blocker on #28437 (see #28437 (comment)). Unfortunately, the decision which behavior is wanted is mostly irrelevant here. As long as colormaps don't have a transparency, the produced RGBA images will have an alpha channel with constant 1, and then multiplying and replacing is the same. But we need a decision to move the PR forward.
I also encountered this issue and noticed that the issue only appears for larger resolutions. For square images, I noticed the cutoff to be at 123 pixels.
Activity
ianthomas23 commentedon Feb 9, 2025
Please can you show us the output of
conda list.jklymak commentedon Feb 9, 2025
I can reproduce this. Worked fine with 3.8.3, and doesn't work with the inline backend and 3.10.0
But thankfully also reproducible by just saving as a png outside of Jupyter.
Also occurs on main...
This bisects to 3ceba40, and is basically caused by #28382
timhoffm commentedon Feb 9, 2025
@jklymak is #28437 the solution to this?
jklymak commentedon Feb 9, 2025
Yes I think so.
timhoffm commentedon Feb 10, 2025
We need to clarify what the intended behavior for array alpha kwarg is on RGBA images. This is the blocker on #28437 (see #28437 (comment)). Unfortunately, the decision which behavior is wanted is mostly irrelevant here. As long as colormaps don't have a transparency, the produced RGBA images will have an alpha channel with constant 1, and then multiplying and replacing is the same. But we need a decision to move the PR forward.
ucabova commentedon Apr 3, 2025
I also encountered this issue and noticed that the issue only appears for larger resolutions. For square images, I noticed the cutoff to be at 123 pixels.
Then increasing the resolution:
timhoffm commentedon Apr 3, 2025
Closed by #28437. This should be fixed in 3.10.1.