Python 3D | Grafico 3D



from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

fig = plt.figure()
ax1 = fig.add_subplot(111, projection='3d')

xpos = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
ypos = [10,1,1,1,1,6,2,1,7,2,3,5,1,3,2]
num_elements = len(xpos)
zpos = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
dx = ldy = ldz = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]

ax1.bar3d(xpos, ypos, zpos, dx, ldy, ldz, color='Blue')
plt.show()