I use the following line to build a 3D surface:
surf = ax3.plot_surface(X, Y, Z, rstride=1, cstride=1, alpha=0.5, linewidth=0, cmap=cm.jet,antialiased=True)
Now the color is going very well, although a little scaly appearance, although beautiful.
But I want to change the surface color of wrt to other data stored in list as:
m = [104.48, 111.73,109.93,139.95,95.05,150.49,136.96,157.75]
I have tried:
norm = cls.Normalize() # Norm to map the 'm' values to [0,1] norm.autoscale(m) cmap = cm.ScalarMappable(norm, 'jet') surf = ax3.plot_surface(X, Y, Z, rstride=5, cstride=5, alpha=0.5, linewidth=0, color=cmap.to_rgba(m), antialiased=True)
But this causes an error because cmap.to_rgba accepts only 1D arrays. Any suggestions on how I can change the colormap surface would be greatly appreciated.