Skip to content

Commit

Permalink
COMPAT: Fix the last warning from matplotlib 3.5.0 (#44544)
Browse files Browse the repository at this point in the history
  • Loading branch information
lithomas1 authored Nov 23, 2021
1 parent 23176c0 commit 5b108bc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pandas/plotting/_matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,6 @@ def _plot_colorbar(self, ax: Axes, **kwds):
# use the last one which contains the latest information
# about the ax
img = ax.collections[-1]
ax.grid(False)
cbar = self.fig.colorbar(img, ax=ax, **kwds)

if mpl_ge_3_0_0():
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/plotting/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def is_grid_on():
obj.plot(kind=kind, grid=False, **kws)
assert not is_grid_on()

if kind != "pie":
if kind not in ["pie", "hexbin", "scatter"]:
self.plt.subplot(1, 4 * len(kinds), spndx)
spndx += 1
mpl.rc("axes", grid=True)
Expand Down

0 comments on commit 5b108bc

Please sign in to comment.