On Wednesday 21 April 2010 19:06:09 Gökhan Sever wrote: > On Wed, Apr 21, 2010 at 4:39 AM, Matthias Michler > > <matthiasmich...@gmx.net>wrote: > > I think it works like expected, i.e. it toggles the state of showing grid > > lines for minor and major ticks. > > The problem it the case were people set only major tick grid lines > > ax.grid(True, which='major') > > and than press the key 'g', because than they change between having major > > and > > minor tick grid lines and this is somehow a strange behavior, isn't it? > > Therefore I myself am not convinced of that solution. > > [...] > > Interesting that setting and using "g" doesn't toggle both minor and major > grids at the same time. It behaves erratically. > event.inaxes.grid(which='minormajor')
Hi Gökhan, Just to make one point clear to me. Do you agree that the following is the expected behavior of your suggestion to use event.inaxes.grid(which='minormajor') after 'g'? If only the major tick grid lines are shown and the user presses 'g' the major tick lines are removed and the minor tick lines are shown, because calling Axes.grid with the default b=None toggles the state of plotting grid lines. Here this means that the minor tick grid lines are switched from being not shown to being shown and the major tick lines change vice versa. If you agree that this is the expected behavior of your suggestion, do you think this is a useful behavior? Kind regards, Matthias ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users