Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
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:
elifstyle=="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