trisurf interpolation changed behavior in 2014b
Show older comments
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?
1 Comment
Eric Sampson
on 5 Dec 2014
Jan-Gerrit, if you don't get a satisfactory answer here or on the newsgroup, you could try posting a link to this question on graphics developer Mike Garrity's blog and see if he responds, a relevant post of his to comment on might be this one: http://blogs.mathworks.com/graphics/2014/11/18/what-is-a-surface/
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

