How can I set the colorbar for a specific series of value ?

1 view (last 30 days)
wenhao yang
wenhao yang on 25 Aug 2021
Commented: wenhao yang on 25 Aug 2021
Just like the color bar in this figure. When I save this figure, the color bar shows (500 1000 1500 2000).
I want the color bar to show like this [300:600:900:1200:1500:1800:2100].

Accepted Answer

Simon Chan
Simon Chan on 25 Aug 2021
Adjust the Limits and Ticks as follows:
cb = colorbar
cb.Limits = [300 2100];

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!