Change x-axis label font size?

I just have a basic plot and I want to change the font size of only the x axis labels. All the methods I'm trying are changing the font size for both the x and y axes and the title. Any tips? Thanks!

5 Comments

Are you referring to the size of the x-axis label (as set by xlabel), or the size of the number labels attached to the tick marks on the x-axis?
The size of the number labels attached to the tick marks on the x axis. For example, I'm plotting temperature as a function of date (in "Jan 01" format) and I'd like the "Jan 01" "Jan 02" "Jan 03" etc labels on the x axis to be a smaller font so they don't overlap.
That's what solution <Answer_272022> below does, precisely (with the caveats mentioned there).
Yes, the solution provided by dpb should answer your question.
Thank you!

Sign in to comment.

Answers (1)

dpb
dpb on 26 Jun 2017
See <numeric ruler properties>. Have to have HG2 (R2014b?) or later. If don't it'll just tell you no such properties so if don't know give it a go...prior to the introduction of the numeric ruler object the 'FontSize' and other properties were global at the axes level only; no way to adjust an individual axis.
Workaround is to not use the actual tick labels but write manually via text

2 Comments

Thanks!
If that solved the problem please Accept Answer to indicate so if nothing else.

Sign in to comment.

Products

Asked:

on 26 Jun 2017

Commented:

dpb
on 28 Jun 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!