Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pandas/plotting/_matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,11 @@ def _plot_colorbar(self, ax: Axes, **kwds):
# use the last one which contains the latest information
# about the ax
img = ax.collections[-1]
return self.fig.colorbar(img, ax=ax, **kwds)
with warnings.catch_warnings():
# https://github.com/matplotlib/matplotlib/issues/23614
# False positive deprecation warning until matplotlib=3.6
warnings.filterwarnings("ignore", "Auto-removal of grids")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this unnecessary now that our min version is 3.6.1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think based on matplotlib/matplotlib#23614 (comment) should be safe to remove

return self.fig.colorbar(img, ax=ax, **kwds)


class ScatterPlot(PlanePlot):
Expand Down