Closed
Description
Bug report
I have the same problem than on this Stackoverflow webpage :
Code for reproduction
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
def main():
plt.ion()
rho = np.random.random((4,4))
xpos = np.arange(0,4,1)
ypos = np.arange(0,4,1)
xpos, ypos = np.meshgrid(xpos, ypos)
xpos = xpos.flatten()
ypos = ypos.flatten()
zpos = np.zeros(4*4)
dx = 0.5 * np.ones_like(zpos)
dy = dx.copy()
dz = rho.flatten()
alpha = 0.5
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.bar3d(xpos,ypos,zpos, dx, dy, dz, alpha=alpha, linewidth=0)
plt.show()
input("Press Enter to continue...")
if __name__ == '__main__':
main()
Actual outcome
The bar on the plot are not transparent at all but they should be.
Matplotlib version
- Operating system: Ubuntu 16.04
- Matplotlib version: 2.0.2
- Matplotlib backend (
print(matplotlib.get_backend())
): Qt5Agg - Python version: 3.6
Matplotlib have been installerd from conda.