8000 Don't warn on grid removal deprecation is grid is hidden · matplotlib/matplotlib@6408397 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6408397

Browse files
committed
Don't warn on grid removal deprecation is grid is hidden
Fixes #21723. See #21723 (comment) for a full desciption of motivation and edge cases.
1 parent 1791022 commit 6408397

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5624,8 +5624,10 @@ def _interp_grid(X):
56245624
return X, Y, C, shading
56255625

56265626
def _pcolor_grid_deprecation_helper(self):
5627-
if any(axis._major_tick_kw["gridOn"]
5628-
for axis in self._get_axis_list()):
5627+
grid_active = any(axis._major_tick_kw["gridOn"]
5628+
for axis in self._get_axis_list())
5629+
grid_hidden_by_pcolor = rcParams['axes.axisbelow']
5630+
if grid_active and not grid_hidden_by_pcolor:
56295631
_api.warn_deprecated(
56305632
"3.5", message="Auto-removal of grids by pcolor() and "
56315633
"pcolormesh() is deprecated since %(since)s and will be "

0 commit comments

Comments
 (0)
0