Using three colors, and values ranging from 0-100, Colorbar is per default splitting up the colors at, respectively, 1/3 and 2/3:
I would like to select this interval manually. E.g. at 1/4 and 1/2.
MWE:
clc; close all; clear all
data = (50+50)*rand(10,3)
% green if acc(:,1)<Crit1
% red if acc(:,1)>Crit2
% yellow if acc(:,1)>Crit1 && acc(:,1)<Crit2
Crit1 = 25;
Crit2 = 50;
imagesc(data)
mycolormap = [0 1 0; 1 1 0; 1 0 0];
colormap(mycolormap)
colorbar
I have previously posted this question (https://math.stackexchange.com/posts/3472347/), probably in the wrong forum, without any response.