On Monday 19 April 2010 20:36:15 Gökhan Sever wrote: > 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.
Hi Gökhan, thanks for testing this small patch. Maybe one of the developers could submit it or should I place it on the patch-tracker? About the toggling of all grid-lines using event.inaxes.grid(which='majorminor') I not sure this is intended, because this means that you will allways toggling major and minor tick - grid lines using key 'g' instead of only toggling major tick grid lines. Maybe a developer or other users could comment on the preferred behavior. Kind regards, Matthias ------------------------------------------------------------------------------ Download Intel® 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