I am using the surf function to plot a 3D spectrogram of some signals, which can have an important spike in some points, and also some continuous CW tones in there.
The problem that I have is that matlab surf function takes for colouring the data the last points value, so the result can be a little bit confusing. This effect can be easily seen in the next pictures.
As it can be seen in both pictures, one of the sides of the peak is yellow while the other one in yellow, effect that happens as the surf is taking the value coming form the left and colors the line to the next point with its value, so in the left side we have some lower value than the peak colored and in the right we have the peak colored till the next point.
I would like to know if there is any way or other function than surfto average those values so that the plot has a more uniform (coherent) color on the spikes.