Scaled colormap of facecolors with mplot3d

时光怂恿深爱的人放手 提交于 2019-12-05 06:43:16

One - dirty - solution would be to rescale the clipped facecolors such that the maximum is equal to the maximum of your height map (in addition to basically what you suggested as attempt 2):

ax.plot_surface(X,Y,z, facecolors=plt.cm.jet(np.clip(fc,0,vmax)*np.max(z)/vmax), cstride=1, rstride=1, vmax=vmax)

Does this give the result you are looking for?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!