Skip to content

Commit ec05c80

Browse files
Backport PR pandas-dev#44544: COMPAT: Fix the last warning from matplotlib 3.5.0 (pandas-dev#44583)
Co-authored-by: Thomas Li <[email protected]>
1 parent f2447ae commit ec05c80

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pandas/plotting/_matplotlib/core.py

-1
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,6 @@ def _plot_colorbar(self, ax: Axes, **kwds):
983983
# use the last one which contains the latest information
984984
# about the ax
985985
img = ax.collections[-1]
986-
ax.grid(False)
987986
cbar = self.fig.colorbar(img, ax=ax, **kwds)
988987

989988
if mpl_ge_3_0_0():

pandas/tests/plotting/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def is_grid_on():
552552
obj.plot(kind=kind, grid=False, **kws)
553553
assert not is_grid_on()
554554

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

0 commit comments

Comments
 (0)