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-
|
|
0
|
|
|
|
Reply
|
David
|
11/20/2009 5:11:04 PM |
|
On Nov 20, 9:11=A0am, "David T" <dtrac...@gmail.com> wrote:
> Hello all,
> =A0 =A0I need to be able to move the title of the colorbar from its defau=
lt center location to off to the right. Here is what i have been trying so =
far with a resulting issue.
>
> h =3D colorbar('h',...);
> set(get(h,'title'),'string','ppb');
> locate =3D get(h,'title');
> pos =3D get(locate,'position'); %it gives a position of 0.0500 2.900 1.00=
01
> pos(1,1) =3D pos(1,1)+0.03;
> set(locate,'pos');
>
> Resulting message:
> "A text's "Position" property does not have a fixed set of property value=
s."
>
> 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
>
> =A0Dave-
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
|
|
0
|
|
|
|
Reply
|
Nathan
|
11/20/2009 6:47:31 PM
|
|
AWESOME! that was it. I didn't even see that, i had been staring at this script for awhile too. Thanks a lot. That makes things a lot easier.
Dave-
|
|
0
|
|
|
|
Reply
|
David
|
11/20/2009 6:54:04 PM
|
|
"David T" <dtracy85@gmail.com> wrote in message <he6okc$l63$1@fred.mathworks.com>...
> AWESOME! that was it. I didn't even see that, i had been staring at this script for awhile too. Thanks a lot. That makes things a lot easier.
>
> Dave-
fyi, calling set with only the property name without a value is supposed to return a list of all allowable values, so the warning was telling you that position doesnt have a list of values (can be any two numbers).
|
|
0
|
|
|
|
Reply
|
matt
|
11/20/2009 7:06:07 PM
|
|
|
3 Replies
3833 Views
(page loaded in 0.051 seconds)
Similiar Articles: comp.soft-sys.matlab Group Informationmove color bar title position 3 3049 comp.soft-sys.matlab Hello all, I need to be able to move the title of the colorbar from its default center location to off to the ... Log scaling of colors/colorbar for pcolor plot - comp.soft-sys ...... 2, 1); imshow(grayImage, []); title('Image with linear "jet" colormap', 'FontSize', fontSize); set(gcf, 'Position', get(0 ... two-level clustered axis bar plot - comp ... Bar chart double y axis question - comp.soft-sys.matlabax2 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','top',... ... Bar Graph: bar color and bar title - comp.soft-sys.matlab ... Bar chart double y axis ... adding graph title on multiplot graph - comp.soft-sys.matlab ...> 'position',[.45 .95 .1 .05],... > 'string','Main Title Here',... > 'fontsize',10) Thanks, but I ... Bar Graph: bar color and bar title - comp.soft-sys.matlab ... adding ... label (annotate) bar graph - comp.soft-sys.matlab... 3D bar graph of a ... lines - comp.soft-sys.matlab Legend ... position text ... Bar Graph: bar color and bar title - comp.soft-sys.matlab ... label (annotate) bar graph ... imshow error - comp.soft-sys.matlab... onion.png'); subplot(2, 2, 1); imshow(a, []); title('Original Color Image'); set(gcf, 'Position ... counts = imhist(a1); subplot(2, 2, 3); bar(counts); title ... newbie: memory fault(core dump) - comp.unix.programmer(intrinsicint) move(0, (COLS - strlen(m->m_title))/2); This ... m_title))/2); addstr(m->m_title); /* Work out position for ... for(;;) { /* remove hightlight bar ... Best way to implement drag and drop for a DIV? - comp.lang ...In other words, as long as I move the mouse slowly, the 'window' will track ... set some global status var on the DIV's onmouseover event to indicate location (title bar ... Safari: show URL when mouse moves over a link? - comp.sys.mac.apps ...... Thanks! > Markus If you've selected "Sow Status Bar ... File name extensions have (exept by convention) no real ... palettes and toolbars which you can open and position ... Different color plots in a loop - comp.soft-sys.matlab... C-1) x=[A:D:B] figure; set(gcf, 'Position ... soft-sys.matlab Multiple Series on a Bar ... Time Block Coding(2)'); title('G4-coded 4x1 ... Different color plots in a loop ... What Is the Title Bar? | eHow.comThe title bar will contain either the name of the ... button down, drag the window to another location on the screen. If you somehow move the window so that the title bar ... How to Move the Task Bar on a Computer Desktop | eHow.comHow to Move the Task Bar on a Computer Desktop ... your Taskbar from its default position at the bottom of the... How to Move the Task Bar ... How to Change the Task Bar Color 7/19/2012 3:56:14 PM
|