余亮罡, on 2011-01-03 13:31, wrote: > I just do not know how to change the font size,could you tell > me that? Thank you !
Here's a small example. You can either keep around the ylabel
from when you first create it:
import matplotlib.pyplot as plt
lbl = plt.ylabel("foo")
lbl.set_size(25)
If you already have the labels on an axes:
ax = plt.gca()
lbl = ax.yaxis.get_label()
lbl.set_size('x-small')
Note that ax.get_ylabel() only gets you the string of the
label, which is why you have to use ax.yaxis.get_label() to get
an instance of the matplotlib.text.Text object in order to change
its size.
hope that helps,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Matplotlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
