I made a custom colour bar where 100 fell exactly at green and 200 at red. Anything from 0 to 100 along with their colours in insignificant and I'd prefer they do not show up in the colour bar. That being said, I would specifically like to have the colour bar such that it starts at the lowest (green) at 100 and ends at the highest (red) at 200.
I used the following code for the image.
figure()A = [200 200 200 200 200; 200 200 200 200 200; 200 200 100 200 200; 200 200 200 200 200; 200 200 200 200 200];Percent_matrix = flipud (A);Percent_Interp = imresize(Percent_matrix,200,'bilinear');pcolor(Percent_Interp)shading interpcaxis([0 200])load CustomColourMapcolormap( CustomColourMap );colorbar();
Best Answer