Skip to content

TST: Filter false positive matplotlib warning #48317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2022
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