10000 Minor fixes re: grid_minor keybinding. · matplotlib/matplotlib@0658c2b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0658c2b

Browse files
committed
Minor fixes re: grid_minor keybinding.
1 parent 32187df commit 0658c2b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/users/navigation_toolbar.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Close all plots **shift** + **w**
9999
Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse
100100
Constrain pan/zoom to y axis hold **y** when panning/zooming with mouse
101101
Preserve aspect ratio hold **CONTROL** when panning/zooming with mouse
102-
Toggle major grid **g** when mouse is over an axes
103-
Toggle major and minor grid **G** when mouse is over an axes
102+
Toggle major grids **g** when mouse is over an axes
103+
Toggle minor grids **G** when mouse is over an axes
104104
Toggle x axis scale (log/linear) **L** or **k** when mouse is over an axes
105105
Toggle y axis scale (log/linear) **l** when mouse is over an axes
106106
================================== =================================================

lib/matplotlib/backend_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,7 @@ def trigger(self, sender, event, data=None):
400400

401401

402402
class _ToolGridBase(ToolBase):
403-
"""Common functionality between ToolGrid and ToolMinorGrid.
404-
"""
403+
"""Common functionality between ToolGrid and ToolMinorGrid."""
405404

406405
_cycle = [(False, False), (True, False), (True, True), (False, True)]
407406

@@ -420,7 +419,8 @@ def trigger(self, sender, event, data=None):
420419

421420
@staticmethod
422421
def _get_uniform_grid_state(ticks):
423-
"""Check whether all grid lines are in the same visibility state.
422+
"""
423+
Check whether all grid lines are in the same visibility state.
424424
425425
Returns True/False if all grid lines are on or off, None if they are
426426
not all in the same state.
@@ -443,7 +443,7 @@ def _get_next_grid_states(self, ax):
443443
x_state, y_state = map(self._get_uniform_grid_state,
444444
[ax.xaxis.majorTicks, ax.yaxis.majorTicks])
445445
cycle = self._cycle
446-
# Bail out if major grids are not in a uniform state.
446+
# Bail out (via ValueError) if major grids are not in a uniform state.
447447
x_state, y_state = (
448448
cycle[(cycle.index((x_state, y_state)) + 1) % len(cycle)])
449449
return x_state, y_state, "major"
@@ -463,7 +463,7 @@ def _get_next_grid_states(self, ax):
463463
x_state, y_state = map(self._get_uniform_grid_state,
464464
[ax.xaxis.minorTicks, ax.yaxis.minorTicks])
465465
cycle = self._cycle
466-
# Bail out if minor grids are not in a uniform state.
466+
# Bail out (via ValueError) if minor grids are not in a uniform state.
467467
x_state, y_state = (
468468
cycle[(cycle.index((x_state, y_state)) + 1) % len(cycle)])
469469
return x_state, y_state, "both"

matplotlibrc.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ backend : $TEMPLATE_BACKEND
584584
#keymap.zoom : o # zoom mnemonic
585585
#keymap.save : s # saving current figure
586586
#keymap.quit : ctrl+w, cmd+w # close the current figure
587-
#keymap.grid : g # switching on/off a grid in current axes
588-
#keymap.grid_minor : G # switching on/off a grid in current axes
587+
#keymap.grid : g # switching on/off major grids in current axes
588+
#keymap.grid_minor : G # switching on/off minor grids in current axes
589589
#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear')
590590
#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear')
591591
#keymap.all_axes : a # enable all axes

0 commit comments

Comments
 (0)
0