Colorbar for matplotlib plot_surface using facecolors
问题 I'm trying to plot in 3D colouring the surface with predefined colours using facecolors . The problem here is that cm.ScalarMappable normalizes surface V of colours while plt.cm.jet don't normalizes, so there is a mismatch of colours and colorbar. I've manually tried to normalize V (i.e. V_normalized ) but the result is still not quite correct. In fact, the highest value of V should be in a corner of the surface, but this is not reflected in the image in practice. How to plot ensuring to have