python - matplotlib 3d surface plots not showing -


i trying make simple 3d surface plot matplotlib plot not show @ end. empty 3d axes. here did

from mpl_toolkits.mplot3d import axes3d  x= np.arange(1, 100, 1)  y= np.arange(1, 100, 1)  z= np.arange(1, 100, 1)  fig= figure()  ax= fig.add_subplot(111, projection ='3d')  ax.plot_surface(x, y, z, rstride= 5, cstride= 5)  show() 

so this

enter image description here

any suggestions?

you not plotting surface: x, y , z needs 2d arrays. @ example: http://matplotlib.org/examples/mplot3d/surface3d_demo.html.


Popular posts from this blog