On Mon, Apr 19, 2010 at 1:31 AM, Matthias Michler
<matthiasmich...@gmx.net>wrote:

> On Sunday 18 April 2010 00:52:57 Gökhan Sever wrote:
> > Hello,
> >
> > Let say we have a figure created by:
> >
> > plt.plot(range(100))
> >
> > On WX backend plt.grid(1) or key "G" responds finely for turning on/off
> the
> > grid lines. However when I log-scale both axes then plt.grid(1 or 0) or
> "G"
> > doesn't respond on minor grid lines.
> >
> > Is there a way to control this behavior?
> >
> > Thanks.
>
> Hi Gökhan,
>
> I can confirm your findings and I hope my attached patch (against current
> svn)
> solves this problem. In the axes.grid the boolean 'b' was set to 'True' if
> the kwarg 'which' was suplied, because it was part of the **kwargs and so
> always b was True in the axis (e.g. ax.xaxis).
>
> Now I get a grid on the minor-ticks by calling:
>
> ax.grid(True, which="majorminor")
>
> and remove the the minortick-grid lines / all grid lines by calling
>
> ax.grid(False, which="minor")
> ax.grid(False, which="majorminor")
>
> Kind regards,
> Matthias


Works  great both "majorminor" and "minormajor" works as a which keyword.

One minor thing. When I updated backend_bases.py as it doesn't function
correctly when I toggle G

        if event.key in grid_keys:
            event.inaxes.grid(which='majorminor')
            self.canvas.draw()

Could you take a look this one as well?

Thanks.

This change should go into the svn.



-- 
Gökhan
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to