Specific color corresponding to specific data using contourf colormap
4 views (last 30 days)
Show 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.
I've already generated the map with, but the colors are random
this is my code :
[v,x] = meshgrid(v,x);
%colourRGB = hsv(jet);
L=[0.1 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]);
I want for example if A(x,y)==0.07 the colormap will be green ...
I can give more details.
Chad Greene on 13 May 2021
Find more on White in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!