importmatplotlib.pyplotaspltimportnumpyasnpfig,ax=plt.subplots(subplot_kw={"projection":"3d"})# 축 제한ax.set_xlim([0,1036])ax.set_ylim([0,1036])ax.set_zlim([0,500])img=plt.imread("image.png")X,Y=np.ogrid[0:img.shape[0],0:img.shape[1]]img=img[-Y,X]# 이미지 뒤집기Z=np.zeros_like(X)# rstride=와 cstride=로 화질을 조정할 수 있다. ax.plot_surface(X,Y,Z,rstride=5,cstride=5,facecolors=img)plt.show()