|
On Nov 20, 9:11 am, "David T" <dtrac...@gmail.com> wrote:
> Hello all,
> I need to be able to move the title of the colorbar from its default center location to off to the right. Here is what i have been trying so far with a resulting issue.
>
> h = colorbar('h',...);
> set(get(h,'title'),'string','ppb');
> locate = get(h,'title');
> pos = get(locate,'position'); %it gives a position of 0.0500 2.900 1.0001
> pos(1,1) = pos(1,1)+0.03;
> set(locate,'pos');
>
> Resulting message:
> "A text's "Position" property does not have a fixed set of property values."
>
> I've also tried using the 'location' option with same result
>
> Anyone have an idea on how to set the position of the color bar title? I need to make many plots at once so using the plot editor is a last resort. Thanks for your help
>
> Dave-
Something I noticed:
when you typed "set(locate,'pos');" you failed to tell Matlab WHERE to
set the position of "locate".
If pos is the variable you are using for the new position, use
something like this:
set(locate,'pos',pos);
-Nathan
|