I followed this link to plot the 3D figure. My problem is I have already 3 lists for X, Y, Z
X.shape (n,) , Y.shape (n,) , Z.shape (n,)
How to pass these lists into surf = ax.plot_surface(X, Y, Z)
as link show each of these variables have the following shape
X.shape (n,n) , Y.shape (n,n) , Z.shape (n,n)
If I passed these coordinate as them each one shape is (n,) then the 3d figure will appear as empty there is no points will be plotted!
I tried to use the np.meshgrid
as following but this way will show only one surface in one plane instead of 3d points!
X,Y,Z = np.meshgrid(X,Y,Z)
X = X[0]
Y = Y[0]
Z = Z[0]
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(X, Y, Z)
plt.show()