Setting range for each color in the colorscale
1 view (last 30 days)
Show older comments
Hi,
I have a plot like the attached. I used the following code to get this:
contourf(x,y,chg, 'edgecolor','none');
colorbar;
colormap(jet);
I want to divide the colorscale by seven colors and each color will have different range which is not linear. Such as:
1st color range: -2.5*10^0 to -10^0
2nd color range: -10^0+0.0001 to -10^-1
3rd color range: -10^-1+0.0001 to -10^-2
4th color range: -10^-2+0.0001 to 10^-2
5th color range: 10^-2+0.0001 to 10^-1
6th color range: 10^-1+0.0001 to 10^-0
7th color range: 10^-0+0.0001 to 2.5*10^-0
Can anyone help me with it? Thanks!
0 Comments
Answers (1)
See Also
Categories
Find more on Colormaps 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!