Thread Subject: Font Size adjustment in Figure label and scale

Subject: Font Size adjustment in Figure label and scale

From: Peter Schreiber

Date: 18 Oct, 2008 17:40:03

Message: 1 of 3

Hi guys,
Does somebody know how to adjust the font size for figure labes, and also the scale on the figure?
The default is 10 but I would like to set it to 16.

I tried the following, but it didn't work.

set(gcf,'FontSize',16)

Best Regards,
Peter

Subject: Font Size adjustment in Figure label and scale

From: Walter Roberson

Date: 18 Oct, 2008 23:01:56

Message: 2 of 3

Peter Schreiber wrote:

> Does somebody know how to adjust the font size for figure labes, and also the scale on the figure?
> The default is 10 but I would like to set it to 16.

> I tried the following, but it didn't work.

> set(gcf,'FontSize',16)

set(findobj(gcf,'Type','text'),'FontSize',16)

Subject: Font Size adjustment in Figure label and scale

From: First Last

Date: 18 Oct, 2008 23:06:01

Message: 3 of 3

"Peter Schreiber" <schreiber.peter15@gmail.com> wrote in message <gdd71j$6ln$1@fred.mathworks.com>...
> Hi guys,
> Does somebody know how to adjust the font size for figure labes, and also the scale on the figure?
> The default is 10 but I would like to set it to 16.
>
> I tried the following, but it didn't work.
>
> set(gcf,'FontSize',16)
>
> Best Regards,
> Peter

Hello Peter, to do this you have to grab a handle for the XLabel properties, which is a child of gca. So ...

h_xlabel = get(gca,'XLabel');
set(h_xlabel,'FontSize',N);

where N is your font size number. To view the other properties that can be set, simply do a

get(h_xlabel)

It helps me to have 'more on' in order to view the output better.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
xlabel handle First Last 18 Oct, 2008 19:10:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com