1
votes

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,

enter image description here

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?

1
but I do not want to put any marker rather I want to make sure each time last value is shown with '>' symbol, I have seen such plots in MATLAB, there must be some way.dSb

1 Answers

5
votes

Just add this after your code:

h.TickLabels{end} = '>20';

or more generally:

h.TickLabels{end} = ['>' h.TickLabels{end}];