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

Contact us at files@mathworks.com