How do I change matlab colorbar scaling
From your comment, I see what you are trying to do.
You are on the right lines setting ytick
, but as you noticed this only changes the position of the ticks on your colorbar, but the scaling stays the same. Instead, try to set yticklabel
:
% Show the colorbar
c = colorbar;
% Define the desired ticks
ticks = [0:10:180];
% Sets the correct location and number of ticks
set(c, 'ytick', ticks / max(ticks));
% Set the tick labels as desired
set(c, 'yticklabel', ticks);