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 commentaires

Shane L
Shane L le 26 Juin 2017
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?
jcm95
jcm95 le 27 Juin 2017
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.
dpb
dpb le 27 Juin 2017
That's what solution <Answer_272022> below does, precisely (with the caveats mentioned there).
Shane L
Shane L le 27 Juin 2017
Yes, the solution provided by dpb should answer your question.
jcm95
jcm95 le 28 Juin 2017
Thank you!

Connectez-vous pour commenter.

Réponses (1)

dpb
dpb le 26 Juin 2017

0 votes

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 commentaires

jcm95
jcm95 le 28 Juin 2017
Thanks!
dpb
dpb le 28 Juin 2017
If that solved the problem please Accept Answer to indicate so if nothing else.

Connectez-vous pour commenter.

Produits

Question posée :

le 26 Juin 2017

Commenté :

dpb
le 28 Juin 2017

Community Treasure Hunt

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

Start Hunting!

Translated by