This is a bug in the axes_grid toolkit. As a matter of fact, gridlines
in rectlinear coordinate are not implemented yet.
Unfortunately, I don't see any easy workarounds.

You may use mpl's original axis artists, but some of the functionality
of axes_grid toolkit may be lost.

    host.toggle_axisline(False)
    host.yaxis.set_ticks_position("left")
    host.yaxis.grid()
    host.set_yscale("log")

With new spine support in mpl, I think a similar plot can be drawn
without using axes_grid toolkit.

Regards,

-JJ


On Mon, Sep 7, 2009 at 4:37 PM, Andreas Fromm<anfr...@gmx.de> wrote:
> thanks Sebastian,
>
> you are right, your code works here too. But i don't get it work in my
> multi y-axes plot from the matplotlib examples
> (http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes.html).
> Even with linear plots, i get no gridlines.
>
> Any idea, whats wrong here?
>
> minimal code example:
> #######################
> import matplotlib.pyplot as plt
> from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes
>
> fig = plt.figure(1)
> fig.clf()
> #plt.grid(True)
> host = HostAxes(fig, [0.15, 0.1, 0.65, 0.8])
> fig.add_axes(host)
>
> host.plot([0, 10, 100], [0, 10, 100], label='host')
>
> host.grid(True)  #?
> host.yaxis.grid(True) #?
>
> host.yaxis.set_scale('log') #?
>
> plt.draw()
> plt.show()
> #######################
>
> Greets,
> Andreas
>
>
> Sebastian Busch schrieb:
>> from matplotlib.pyplot import *
>>
>> plot([1,10,100],[1,10,100])
>> grid()
>>
>> yscale('log')
>> xscale('log')
>>
>> works here.
>>
>> best,
>> sebastian.
>>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to