On Wed, Aug 4, 2010 at 2:21 AM, R. Padraic Springuel
<r.spring...@umit.maine.edu> wrote:
> Things I've tried:
> Adding a size keyword argument to the set_xlabel and set_ylabel commands
> (both numerical and keywords).  No errors are raised, but nothing is
> changed on the plot.
>
> Adding host.axis["left"].set_size(24) and
> par.axis["right"].set_size('large'), to the code.  This raises an
> AttributeError: 'AxisArtist' object has no attribute 'set_size'
>
> Adding host.set_size(24) and par.set_size('large') to the code.  This
> raises an AttributeError: 'AxesHostAxes' object has no attribute 'set_size'
>
> Any suggestions for how to get the font size larger?


host.axis["left"].major_ticklabels.set_size(24)

or

host.axis["left"].label.set_size(24)

should work.

On the other hand, if you're using matplotlib v1.0 or later, I
recommend you to use "axes_grid1" instead of "axes_grid". With
axes_grid1, set_xlable and set_ylable work as expected. For example,
your code can be something like below.

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.parasite_axes import HostAxes

fig = plt.figure()
host = HostAxes(fig,[0.08, 0.1, 0.82, 0.83])
fig.add_axes(host)
par = host.twinx()
host.set_xlabel('Dominant Characteristic Threshold', size=24)
host.set_ylabel('Number of Groups', size=24)
par.set_ylabel(' Noise Students', size=24)

# bunch of plot commands

host.set_ylim(0,8)
par.set_ylim(0,0.9)

Regards,

-JJ

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to