Hello,
Matlab 2014b brought changes to the whole plotting functions. Unfortunatly, this introduced a bug into a plotting function that i use frequently. I measure data on a sphere around an object (usually loudspeakers) and plot magnitude and phase of this data using trisurf.
The phase is plotted as the color. As it is only defined between 0 and 2*pi, there are points, where the phase jumps from one end of the color bar to the other. The colorbar is set to have the same color on both sides, so that these jumps are not visible (colormap hsv).
An example created with the attached function is shown in this figure:
The magnitude of every point on the sphere is set to one, and the phase is changing with azimuth direction from 0 to 2pi.
Since the change to 2014b the trisurf interp option introduces a "rainbow" between these points.
Although this behavior can be considered correct (there is a value of 0 next to a value of 6 so there has to be every other value in between) it is not really suitable for my uses as the phase is not continuous. This plot now suggests corrupted data of some kind.
Without the interp option (option 'FaceColor','flat') this break is no longer visible. Unfortunately the plot in itself does not look "presentable" any more (not really visible in this example case).
My guess is, that matlab used to interpolate between the color of neighboring faces and is now interpolating between values.
My question now becomes: Is there a way to switch between these suspected modes?
Best Answer