I am plotting a phase map and using a circular colormap like hsv. The issue I am having is at the pi/-pi angle interfaces, the interpolation (shading interp command in MATLAB) gives me 0, which leads to strange lines in the resulting figure (see below, the below figure is the 4 tangent arctan function). Is there a way I can get rid of these artifacts? I like the smoothness of interpolated shading as opposed to flat shading, but flat shading avoids these artifacts.
Here is the code that generates the above image:
[x_grid,y_grid] = meshgrid(-31:32,-31:32);
phase = atan2(y_grid,x_grid);
surf(x_grid,y_grid,phase);
view(0,90);
shading interp
colorbar
axis([-31 32 -31 32])
colormap hsv