I would like to reposition the colorbar title (not the colorbar itself). I tried using the following code:
cb = colorbar;
set(get(cb,'title'),'string','Dislocation Density(m^{-2})');
lbpos = get(cb,'title');
pos = get (lbpos,'position');
set(lbpos, 'position', pos) ;
I have got three problems:
- there are four numbers in the vector
pos
and I don't know which number should I modified in order to move the title upward so that it would not overlap the colorbar. - I have tried to alter some number in
pos
but whatever I do the title just move down and overlap with the colorbar. - In addition, when I try to enlarge the whole graph with the maximize button at the upper right corner, the position of the colorbar title also changes. This doesn't happen if I don't try to re-position the colorbar title.