Thread Subject: How to set font size in axis tick labels?

Subject: How to set font size in axis tick labels?

From: Mark Proulx

Date: 21 Aug, 2008 21:11:02

Message: 1 of 10

How do I set the font size in my axis tick labels? I've
set the "tick label mode" from 'auto' to 'manual,' but
haven't been able to get beyond this. I figure that if I
could find the handle value for the axis labels, I'd have
it made, but I can't figure out how to do this, either.

Subject: How to set font size in axis tick labels?

From: Walter Roberson

Date: 21 Aug, 2008 23:05:14

Message: 2 of 10

Mark Proulx wrote:
> How do I set the font size in my axis tick labels?

Set the FontSize property of the axes.

>> plot(rand(1,20));set(gca,'FontSize',3)


--
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end

Subject: How to set font size in axis tick labels?

From: Matt Fig

Date: 21 Aug, 2008 23:06:01

Message: 3 of 10

The handles for the axis labels are stored in the 'xlabel'
property of the axes.

plot([1:10])
xlhand = get(gca,'xlabel')
set(xlhand,'string','X','fontsize',20)

Subject: How to set font size in axis tick labels?

From: Mark Proulx

Date: 21 Aug, 2008 23:21:01

Message: 4 of 10

Walter Roberson <roberson@hushmail.com> wrote in message
<Kwmrk.101670$nD.18048@pd7urf1no>...
> Mark Proulx wrote:
> > How do I set the font size in my axis tick labels?
>
> Set the FontSize property of the axes.
>
> >> plot(rand(1,20));set(gca,'FontSize',3)
>
>
> --
> Q = quotation(rand);
> if isempty(Q); error('Quotation server filesystem
problems')
> else sprintf('%s',Q), end

It worked great; huge thanks!

Mark

Subject: How to set font size in axis tick labels?

From: Mark Proulx

Date: 21 Aug, 2008 23:22:02

Message: 5 of 10

"Matt Fig" <spamanon@yahoo.com> wrote in message
<g8kscp$rvb$1@fred.mathworks.com>...
> The handles for the axis labels are stored in the 'xlabel'
> property of the axes.
>
> plot([1:10])
> xlhand = get(gca,'xlabel')
> set(xlhand,'string','X','fontsize',20)
>
>

Many thanks for the answer. While Walt's answer got me out
of my immediate difficulty, your answer gives me
information that will be useful in the long term!

Mark

Subject: How do we do this for only the x axis ??

From: Juliette Salexa

Date: 8 Jul, 2009 20:32:19

Message: 6 of 10

How do we do this for only the x axis and NOT the y axis ??

Subject: How do we do this for only the x axis ??

From: TideMan

Date: 8 Jul, 2009 21:27:30

Message: 7 of 10

On Jul 9, 8:32 am, "Juliette Salexa" <juliette.physic...@gmail.com>
wrote:
> How do we do this for only the x axis and NOT the y axis ??

Look at Matt Fig's post.
That shows you how to apply only to the x-axis.

Subject: How do we do this for only the x axis ??

From: Nathan

Date: 8 Jul, 2009 21:29:52

Message: 8 of 10

On Jul 8, 2:27 pm, TideMan <mul...@gmail.com> wrote:
> On Jul 9, 8:32 am, "Juliette Salexa" <juliette.physic...@gmail.com>
> wrote:
>
> > How do we do this for only the x axis and NOT the y axis ??
>
> Look at Matt Fig's post.
> That shows you how to apply only to the x-axis.

Matt Fig's post applies to the Xlabel, not Xlabelticks, as I think
Juliette is wanting.
I almost said the same thing until I figured that out.

And sorry, I can't figure it out either.
-Nathan

Subject: How do we do this for only the x axis ??

From: Juliette Salexa

Date: 8 Jul, 2009 21:45:03

Message: 9 of 10

Yes those methods listed above (trust me I've tried them all) only work for the xlabels, and for XTickLabels, modifying the fontsize modifies the YTickLabels fontsizes simultaneously.

There should be a way around this .. anyone know ??

Subject: How do we do this for only the x axis ??

From: Doug Schwarz

Date: 8 Jul, 2009 22:06:43

Message: 10 of 10

In article <h3340v$rft$1@fred.mathworks.com>,
 "Juliette Salexa" <juliette.physicist@gmail.com> wrote:

> Yes those methods listed above (trust me I've tried them all) only work for
> the xlabels, and for XTickLabels, modifying the fontsize modifies the
> YTickLabels fontsizes simultaneously.
>
> There should be a way around this .. anyone know ??

There is not. The property that controls both the XTickLabels and
YTickLabels is FontSize. The only thing you can do is create separate
text items and put them where you want the labels to go.

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

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
size in axis ti... Sprinceana 9 Jul, 2009 02:16:56
rssFeed for this Thread

Contact us at files@mathworks.com