Skip to content

Commit

Permalink
Merge pull request #22311 from meeseeksmachine/auto-backport-of-pr-22…
Browse files Browse the repository at this point in the history
…285-on-v3.5.x

Backport PR #22285 on branch v3.5.x (Don't warn on grid removal deprecation if grid is hidden)
  • Loading branch information
dstansby committed Jan 25, 2022
2 parents 141fa0c + d634609 commit 1ccc8cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5617,8 +5617,11 @@ def _interp_grid(X):
return X, Y, C, shading

def _pcolor_grid_deprecation_helper(self):
if any(axis._major_tick_kw["gridOn"]
for axis in self._get_axis_list()):
grid_active = any(axis._major_tick_kw["gridOn"]
for axis in self._get_axis_list())
# explicit is-True check because get_axisbelow() can also be 'line'
grid_hidden_by_pcolor = self.get_axisbelow() is True
if grid_active and not grid_hidden_by_pcolor:
_api.warn_deprecated(
"3.5", message="Auto-removal of grids by pcolor() and "
"pcolormesh() is deprecated since %(since)s and will be "
Expand Down

0 comments on commit 1ccc8cd

Please sign in to comment.