MATLAB: How to set a color for a certan value (without showing that value in the colorbar)

colorbarset color to value

Dear community,
this is my very first post and I'm new to Matlab, I hope I'm not asking for anything very obvious.
So I'm plotting (surface) a map of Greenland. I have values ranging from 0-1 ("FI"). I just want to see the range from 0.53-0.73, which works fine with using my own colormap and: colormap(map); surface(longrid,latgrid,FI, 'EdgeColor', 'none'); caxis([0.52 0.73]); c = colorbar('Ticks',[0.53:0.02:0.73],'YColor',[0 0 0]);. But now I would like to set the sea around Greenland to the color white or blue. In my matrix (FI) the sea grids have the value zero (but I can set them to any value), so can I somehow just say: "plot zeros white" without having the white/zeros showing up in my colorbar?
Thanks a lot in advance!

Best Answer

I suggest changing the 0-values to NaNs; in a surface plot, those values aren't plotted, so the background axis color shows through instead:
FI(FI == 0) = NaN;
colormap(map);
surface(longrid,latgrid,FI, 'EdgeColor', 'none');
caxis([0.52 0.73]);
c = colorbar('Ticks',[0.53:0.02:0.73],'YColor',[0 0 0]);
set(gca, 'color', 'w'); % or whatever color you want for the background