-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/alpha
Description
Bug report
Bug summary
When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to handle that in the definition of pcolorfast:
elif style == "pcolorimage":
im = mimage.PcolorImage(self, x, y, C,
cmap=cmap,
norm=norm,
alpha=alpha, # <- here
**kwargs)
Code for reproduction
plt.gca().pcolorfast(
[4, 8, 10], [7, 8, 10, 11], np.array([[0, 1], [2, 3], [4, 5]]),
alpha=.5, cmap="viridis")
Actual outcome
The alpha channel is not applied. Compare e.g. with
plt.gca().pcolorfast(
(0, 1), (2, 3), np.array([[0, 1], [2, 3], [4, 5]]),
alpha=.5, cmap="viridis")
which uses AxesImage and correctly applies alpha.
Expected outcome
per above
Matplotlib version
- Operating system: linux
- Matplotlib version: 3.0 and master
- Matplotlib backend (
print(matplotlib.get_backend())
): qt5agg - Python version: 3.7
- Jupyter version (if applicable): n/a
- Other libraries: n/a
Metadata
Metadata
Assignees
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/alpha