x_data, y_data = np.meshgrid(np.arange(data_array.shape[1]), np.arange(
    data_array.shape[0]))
x_data = x_data.flatten()
y_data = y_data.flatten()
z_data = data_array.flatten()
ax.bar3d(x_data, y_data, np.zeros(len(z_data)), 1, 1, z_data)
plt.show()
How can I render 3D histograms in python?