Specific color corresponding to specific data using contourf colormap
8次意见(过去30天)
显示older comments
你好,
I would like to know if we can give a specific color to a specific data and plot them on Matlab ?
For example, I have a 3000x3000 matrix with x and y axis, I need to plot a range of data in a specific color.
我已经生成了地图,但颜色是随机的
this is my code :
a =数据;
数字;
[v,x] = meshgrid(v,x);
contourf(v,x,a)
数字;
%Colourgb = HSV(喷气机);
c = Colormap(喷气机);%jet
L = [0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1];
[cdd hc]=contourf(v,x,A,[-0.01 L]);
Recolor_contourf(hc,c,L,'vert');
I want for example if A(x,y)==0.07 the colormap will be green ...
I can give more details.
Kind regards,
S.C.