On Wed, Jul 8, 2009 at 9:47 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:

> axes_grid toolkit uses slightly customized version of axes and
> different kind of artists are used to draw ticks and ticklabels, and
> some of the commands from original mpl do not work.
> But not changing fontsize and not showing up gridlines are things that
> should be fixed (I'll work on these in a few days).
> Meanwhile, there are workarounds.
>
> For fontsize, try to directly set the font size of the label object.
> Unfortunately, the padding between the label and the axis get messed
> up, and you need to adjust the padding manually.
>
> host.axis["bottom"].label.set_size(30)
> host.axis["bottom"].LABELPAD=10
>
> For grid, it is a bit more tricky.
>
> host.xaxis.set_visible(True)
> host.yaxis.set_visible(True)
> host.xaxis.get_label().set_visible(False)
> host.yaxis.get_label().set_visible(False)
> for a in host.xaxis.majorTicks + host.yaxis.majorTicks:
>    a.gridOn=True
>    a.tick1On=False
>    a.tick2On=False
>    a.label1On=False
>    a.label2On=False
>
> I hope these workarounds are useful.
> Thanks for reporting the problems and I;ll try to fix them soon.
> Regards,
>
> -JJ
>
>
>
>
> On Wed, Jul 8, 2009 at 10:00 PM, Gökhan SEVER<gokhanse...@gmail.com>
> wrote:
> > Hello,
> >
> > I am using axes_grid toolkit to create multiple axes. The labels' colors
> are
> > nicely being updated, however size or fontsize has no effect on the
> > resulting figure :( Are they functional, or is it something wrong with my
> > implementation? Oh also I couldn't make the grids switched on my figures.
> >
> > Here is the snippet that I use:
> >
> > fig = plt.figure(1)
> > host = SubplotHost(fig, 111)
> > fig.add_subplot(host)
> > par = host.twinx()
> > host.set_xlabel("Time [sfm]", size=50)
> > host.set_ylabel("DMT CCN Concentration [#/cm^3]", fontsize=20)
> > par.set_ylabel("Supersaturation [%]", fontsize=20)
> >
> > p1, = host.plot(Time, dccnConc, label="dccnConc")
> > p2, = host.plot(Time, dccnConAmb, label="dccnConAmb")
> > p3, = host.plot(Time, dccnConSTP, label="dccnConSTP")
> > p4, = par.plot(Time, dccnSS, label="dccnSS")
> > p5, = par.plot(Time, dccnSS_Amb, label="dccnSS_Amb")
> >
> > host.axis["left"].label.set_color(p1.get_color())
> > par.axis["right"].label.set_color(p5.get_color())
> >
> > host.axis["left"].label.set_label(p1.get_label())
> > host.legend()
> > plt.show()
> >
> >
> > These are my current system properties:
> >
> > Linux 2.6.27.19-170.2.35.fc10.i686.PAE (Fedora 11)
> > Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
> > IPython 0.10.bzr.r1174 (with --pylab)
> > and a very recent Matplotlib svn version.
> >
> > Thanks.
> >
> > --
> > Gökhan
> >
> >
> ------------------------------------------------------------------------------
> > Enter the BlackBerry Developer Challenge
> > This is your chance to win up to $100,000 in prizes! For a limited time,
> > vendors submitting new applications to BlackBerry App World(TM) will have
> > the opportunity to enter the BlackBerry Developer Challenge. See full
> prize
> > details at: http://p.sf.net/sfu/Challenge
> > _______________________________________________
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>

Jae-Joon,

Your suggested work-arounds worked like a charming. See my before and after
plots at the given links:

http://img34.imageshack.us/img34/3899/dccnplot1.png
http://img27.imageshack.us/img27/6274/dccnplot2.png

I have one tiny question left working on these figures; that is: how to make
mathtext font and a regular label font at the same size?

For instance:

host.set_ylabel(r"DMT CCN Concentration [ #/$cm^3$]")

but as it is seen from the figure they look a bit weird.

Thank you.

PS: I am glad I could add a little bit into this great piece of
visualization toolkit.

-- 
Gökhan
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to