Reputation: 1035
I am plotting a spatial plot, where I am displaying values from say 0 to 20 in colormap.
This is what I am doing,
caxis([0 20])
h = colorbar('Fontsize', 4, 'LineWidth', 0.15);
Below is the generated colorbar,
Since, few values are larger than 20, I want to display the largest tick value in colorbar as >20
instead of 20
.
How to do it?
Upvotes: 1
Views: 612
Reputation: 10440
Just add this after your code:
h.TickLabels{end} = '>20';
or more generally:
h.TickLabels{end} = ['>' h.TickLabels{end}];
Upvotes: 5