Matlab: Using imagesc in grayscale without black

imagesc(m)
cmap = [.7 .7 .7 %// light gray
        1  1  1] %// white
colormap(cmap)
colorbar('Ytick',[.25 .75],'Yticklabel',[0 1]) %// only two values in colorbar

Leave a Comment