![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305843/image.png)
Set interval for colorbar
36 ビュー (過去 30 日間)
古いコメントを表示
Dear all, I used
colormap bone
colorbar
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305839/image.jpeg)
But I want to have a color bar like this (intervals splite colors like this):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305835/image.jpeg)
I searched and used this:
colorbar('Ticks', 0:0.1:1);
But it does not work and doesn't change anything. Any advice is highly appreciated.
Thank you in advance
0 件のコメント
採用された回答
Ameer Hamza
2020 年 5 月 30 日
Try this
intervals = 0:0.1:1;
clrs = bone(2*numel(intervals)-2);
colormap(clrs);
colorbar
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305843/image.png)
1 件のコメント
Hasan Jamil Apon
2021 年 4 月 12 日
If I want to set color limit for 3D plot,then what sort of changes I have to make? Like I want the red color for the Z axis value between 0.8 to 0.93, cyan color for Z axis value between 0.93 to 0.95, yellow color for Z axis value between 0.95 to 1 for given X and Y values. I want to indicate only these 3 colors. Please give me some guidance in this issue. Will be really be grateful!
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!