from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax1 = plt.axes(projection='3d')
a = [4,2,5,7,8,2,9,3,7,8]
b = [5,6,7,8,2,5,6,3,7,2]
c = np.zeros(10)
x = np.ones(10)
y = np.ones(10)
z = [5,3,7,4,8,2,4,8,9,1]
ax1.bar3d(a, b, c, x, y, z, color = 'cyan')
ax1.set_xlabel('x axis')
ax1.set_ylabel('y axis')
ax1.set_zlabel('z axis')
plt.show()
In [ ]:
In [ ]: