Skip to content

Commit bfdb524

Browse files
authored
TST: Filter false positive matplotlib warning (#48317)
1 parent b3e8bbe commit bfdb524

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/plotting/_matplotlib/core.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,11 @@ def _plot_colorbar(self, ax: Axes, **kwds):
11771177
# use the last one which contains the latest information
11781178
# about the ax
11791179
img = ax.collections[-1]
1180-
return self.fig.colorbar(img, ax=ax, **kwds)
1180+
with warnings.catch_warnings():
1181+
# https://github.com/matplotlib/matplotlib/issues/23614
1182+
# False positive deprecation warning until matplotlib=3.6
1183+
warnings.filterwarnings("ignore", "Auto-removal of grids")
1184+
return self.fig.colorbar(img, ax=ax, **kwds)
11811185

11821186

11831187
class ScatterPlot(PlanePlot):

0 commit comments

Comments
 (0)