Set distance between the ticks in the colorbar
15 views (last 30 days)
Show older comments
Hello,
I have created a contour map and a colorbar with manual ticks. The issue is with the ticks vector.
In the 1st figure, the values are equally spaced. Hence the ticks align with colors properly.
In the 2nd figure, the vectors are not spaced uequally for the 1st two and last two values. Hence, it does not align with colors.
PS: The number of colors and vector values is proper. Issue lies with the aligning only.
3 Comments
Adam Danz
on 27 Oct 2020
The tick labels will always be at the location of the ticks. That's why you have to calculate the position of the ticks correctly.
Here's an example
Answers (0)
See Also
Categories
Find more on Colorbar 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!