Setting range for each color in the colorscale

1 Ansicht (letzte 30 Tage)
Tawfiq1448
Tawfiq1448 am 21 Jul. 2019
Beantwortet: Walter Roberson am 22 Jul. 2019
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!CHGCAR_plot.jpg

Antworten (1)

Walter Roberson
Walter Roberson am 22 Jul. 2019

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by