how to change the colorbar spacing

13 ビュー (過去 30 日間)
karen patricia gaitan de los rios
karen patricia gaitan de los rios 2021 年 6 月 12 日
I want to make a plot like this.
I used the PCOLOR and CAXIS function ([0 10]) to set the range. But I want the rank from 0 to 300, but that each level or label increases in a different way to linear.
How can I edit the increase in the spacing of the colored bar of the plot?
My plot in this moment is this:
But the Cscale isn't what I need.
  2 件のコメント
Image Analyst
Image Analyst 2021 年 8 月 3 日
You say you want "each level or label increases in a different way to linear". OK, no problem but you have to define that different way. Do you have some formula for it, like a gamma or log or something? If so, what is it?
karen patricia gaitan de los rios
karen patricia gaitan de los rios 2021 年 8 月 3 日
Yes, I need that the result to increase in a different way to the linear, for example in an exponential way. I understand the map matrix in color bar have to be defined, but I don't got how to do that.

サインインしてコメントする。

回答 (1 件)

Vimal Rathod
Vimal Rathod 2021 年 6 月 15 日
Hi,
You could use the 'TickLabels' property of colorbar to put the labels which you need in the places where you would like to have.
colorbar('Ticks',[0,50,100,150,200,300],...
'TickLabels',{'0.0','3.0','4.0','5.2','15.0', '300'})
Refer to the following link for more information on colorbar and also have a look at other examples given in the link for more info.
  1 件のコメント
karen patricia gaitan de los rios
karen patricia gaitan de los rios 2021 年 8 月 3 日
編集済み: karen patricia gaitan de los rios 2021 年 8 月 3 日
It doesn't work.
My result is bad.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by