Imagesc change "background" color

41 views (last 30 days)
martin martin
martin martin on 30 Mar 2019
Answered: Image Analyst on 30 Mar 2019
Hello guys,
I have a simple question, how can I set "background" color to white? Or how can I set a color of points with a specific value - for example all ones will be white.
Best regards
a = rand(50);
b = zeros(10,50);
c = [b; a; b];
colormap jet

Answers (1)

Image Analyst
Image Analyst on 30 Mar 2019
Use a different colormap
cmap = jet(256);
% Make lowest one black
cmap(1,:) = 0;

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!