Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing ALL fonts in a figure

1 view
Skip to first unread message

Jonathan

unread,
Jul 23, 2008, 11:09:02 AM7/23/08
to
Is there an easy way to change ALL the font sizes in a
figure via hard code? I want to change the size similar to
how it can be dont with the export feature but the only
syntax i have come across is shown below but I dont want
to have to set the text,axis,legent sizes seperate.

set(0,'DefaulttextFontSize',fntsz)

Bruno Luong

unread,
Jul 23, 2008, 12:19:01 PM7/23/08
to
"Jonathan " <no...@domain.com> wrote in message
<g67hie$4f1$1...@fred.mathworks.com>...

fig=gcf;
set(findall(fig,'-property','FontSize'),'FontSize',12)

Jonathan

unread,
Oct 17, 2008, 11:26:02 AM10/17/08
to
Why is it that when i use the syntax

> fig=gcf;
> set(findall(fig,'-property','FontSize'),'FontSize',12)

the fonts change but when i excute get(gcf) i dont see the 'FontSize' data? How can i view what is stored in the '-property' switch?


"Bruno Luong" <b.l...@fogale.fr> wrote in message <g67lll$1e1$1...@fred.mathworks.com>...

Steven Lord

unread,
Oct 17, 2008, 11:54:26 AM10/17/08
to

"Jonathan " <no...@domain.com> wrote in message
news:gdaaqa$t8v$1...@fred.mathworks.com...

> Why is it that when i use the syntax
>
>> fig=gcf;
>> set(findall(fig,'-property','FontSize'),'FontSize',12)
>
> the fonts change but when i excute get(gcf) i dont see the 'FontSize'
> data? How can i view what is stored in the '-property' switch?

findall(fig, '-property', 'FontSize') operates very similarly to
findobj(fig, '-property', 'FontSize'). From the reference page for FINDOBJ:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/findobj.html

"h = findobj('-property','PropertyName') finds all objects having the
specified property.
h = findobj(objhandles,...) restricts the search to objects listed in
objhandles and their descendants. "

The ... in the description of the second syntax I've quoted indicates that
you can use the objhandles input and follow it with other syntaxes in your
call. So this searches for all objects in fig and its decendants (because
of the objhandles syntax) for any object with the property FontSize (because
of the first syntax I quoted above, the one using '-property'.) The object
whose handle is stored in fig (the figure) does not need to have the
property FontSize; the FINDALL call will find all objects descended from fig
that do possess that property.

--
Steve Lord
sl...@mathworks.com


Tony

unread,
Oct 17, 2008, 11:16:36 PM10/17/08
to
cool!!!
0 new messages