How do I change the font size for the default coordinates in matplotlib?

Carl carlwenrich at gmail.com
Fri Mar 21 11:15:55 EDT 2008


On Mar 20, 10:12 pm, "attn.steven.... at gmail.com"
<attn.steven.... at gmail.com> wrote:
> On Mar 20, 8:20 pm, Carl <carlwenr... at gmail.com> wrote:
>
> > I've searched the user manual (and this forum) but I don't see
> > anything that helps.
>
> Did you mean the font size for the ticks or for
> the labels?  Here's an example:
>
> from pylab import *
>
> x = arange(0, 2*pi, 0.01)
> y = sin(2*pi*x)
>
> rcParams.update({'xtick.labelsize': 5, 'ytick.labelsize': 10})
>
> subplot(111)
> plot(x,y)
> ylabel("Vert",  fontsize=15)
> xlabel("Horiz", fontsize=20)
> show()
>
> --
> Hope this helps,
> Steven

It was the:
rcParams.update({'xtick.labelsize': 5, 'ytick.labelsize': 10})
that fixed it.

Thanks.



More information about the Python-list mailing list