# font size in matplotlib

Hello! Could somebody please help me find a way to change the font size in Matplotlib plots. Particularly, I would like to change the size of the axis ticks labels.

Thank you. vladimir

font size in matplotlib

Hello! Could somebody please help me find a way to change the font size in Matplotlib plots. Particularly, I would like to change the size of the axis ticks labels.

Thank you. vladimir

add a comment

0

Is this example from the docs what you want? http://www.sagemath.org/doc/reference...

Or even just `plot(x^2,(x,0,2), fontsize=20)`

Note that these answers are for *sage*commands. If you are looking for how to deal with matplotlib plots, it might be better to post to the matplotlib help list. Or personally, I usually just look at the matplotlib gallery (http://matplotlib.sourceforge.net/gal...) and find something close to what I want.

Yes, I was talking about the direct usage of Matplotlib. An currently the only solution I found is this one: http://stackoverflow.com/questions/6390393/matplotlib-make-tick-labels-font-size-smaller

0

yticks(fontsize=SIZE) should work:

```
import pylab
import matplotlib
pylab.clf()
#pylab.rc('text', fontsize=18) #This is a 'bad' but effective way to change the default font size
pylab.plot(xdata, ydata, '--')
pylab.xlabel(r"$x$",fontsize=24)
pylab.ylabel(r"$y$",fontsize=24)
pylab.yticks(fontsize=40)
pylab.yticks(fontsize=40)
pylab.savefig('transspeclin.pdf', format='pdf')
pylab.savefig('transspeclin')
pylab.show()
```

Asked: **
2011-12-05 01:00:49 -0500
**

Seen: **16,824 times**

Last updated: **Dec 05 '11**

Is there any way to integrate matplotlib plots in my latex document using sagetex?

How can I determine or control a plot's display scale?

Displaying images with matplotlib

UnicodeDecodeError in matplotlib if 'python' set instead of 'sage' in Notebook [closed]

How to change axes labels font size in PGF (possible bug?)?

Displaying a matplotlib picture using SageTeX

How to show on a plot minor gridlines with a different thickness?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.