I am facing a problem with the contourf
function.
Here is my code, which is part of a gui (hence the handles):
contourLevels = (1:0.5:60);
axes(handles.firstcontouraxes);
contourf(Y,fliplr(X),z1, contourLevels,'edgecolor','none');
axis equal
colormap(cmap);
colorbar();
title('Paramater a plot');
set(gca,'TickDir','out','box','off');
Yielding the following plot:
As you can see, there is a red edge at the interface between the sample and air (air is when the value is 0 and appear white).
I suspect that contourf
is trying to smooth my data, as the white area (air) is made of 0s and then we suddenly have relatively larger values at the sample-air interface.
Is it possible to remove this feature?