Maybe use matplotlib plot_surface or plot_wireframe :
import matplotlib.pyplot as plt
import numpy as np
import mpl_toolkits.mplot3d.axes3d as axes3d
np.random.seed(1)
fig, ax = plt.subplots(subplot_kw=dict(projection='3d'))
N = 100
X, Y = np.meshgrid(np.arange(N), np.arange(N))
heights = np.sin(2*np.pi*np.sqrt(X**2+Y**2)/N)
ax.plot_surface(X, Y, heights, cmap=plt.get_cmap('jet'))
plt.show()

These functions require three 2D-array: X, Y, Z. You have the height Z. To create standard layouts Xand Yassociated with these Zs, you can use np.meshgrid.
source
share