Font size on an axis

Hey all,

wow, this seems like it should be an easy thing but I am not finding answers in the gallery or searching the documentation.

How does one set the font size on ticklabels and labels for a figure?

I would expect something like plot(arange(11), xfontsize=14) to work but I am not finding any keywords here for that. what am I missing?

this works for the labels
plot(arange(11))
ax=gca()
ax.set_xlabel('i am x', size=18)

I am trying all sorts of weird things for the ticklabels like
plot(arange(11))
ax=gca()
for val in ax.get_xticklabels():
    ax.set_xticklabels(val._text, size=18)

but this must be wrong.

Thanks much,

Brian

···

--
-----------------------------------------------------------
Brian A Larsen, PhD
RBSP-ECT Instrument Suite Scientist

Boston University
Center for Space Physics
725 Commonwealth Ave, Rm 506
Boston, MA 02215-1401
T: 617-358-4945
F: 617-353-6463
balarsen@...728...

Hello,

What I do is to set it _before_ plotting through the rcParams.

rcParams['xtick.labelsize']=24

There is also the possiblity to change that property afterwards with an argument to xticks.

xticks(fontsize=24)

Pierre

···

Le 21 janv. 10 à 22:36, Brian Larsen a écrit :

How does one set the font size on ticklabels and labels for a figure?

I would expect something like plot(arange(11), xfontsize=14) to work
but I am not finding any keywords here for that. what am I missing?