From 2e5840076547031ee468be40302ac0a42e3affd1 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 20 Nov 2021 13:08:11 -0800 Subject: [PATCH 1/5] COMPAT: Fix the last warning from matplotlib 3.5.0 --- pandas/tests/plotting/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/plotting/common.py b/pandas/tests/plotting/common.py index 52127b926f1fa..ff7ec4aa90b84 100644 --- a/pandas/tests/plotting/common.py +++ b/pandas/tests/plotting/common.py @@ -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 != "pie" or kind != "hexbin": self.plt.subplot(1, 4 * len(kinds), spndx) spndx += 1 mpl.rc("axes", grid=True) From 80d28c2d3bc2a9e3b55548e73322fe7ac12dbd26 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 20 Nov 2021 13:09:26 -0800 Subject: [PATCH 2/5] revert bad patch --- pandas/plotting/_matplotlib/core.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 08dc9538227f7..ba47391513ed2 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -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(): From 73c10402e99f89862f0ad91ce103e5ed5bef6b63 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 20 Nov 2021 13:38:43 -0800 Subject: [PATCH 3/5] Update common.py --- pandas/tests/plotting/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/plotting/common.py b/pandas/tests/plotting/common.py index ff7ec4aa90b84..c2dd37844486e 100644 --- a/pandas/tests/plotting/common.py +++ b/pandas/tests/plotting/common.py @@ -552,7 +552,7 @@ def is_grid_on(): obj.plot(kind=kind, grid=False, **kws) assert not is_grid_on() - if kind != "pie" or kind != "hexbin": + if kind not in ["pie", "hexbin"]: self.plt.subplot(1, 4 * len(kinds), spndx) spndx += 1 mpl.rc("axes", grid=True) From d04c18d467eae4b8006b5108514c001c81bae1c3 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 20 Nov 2021 17:19:07 -0800 Subject: [PATCH 4/5] Update common.py --- pandas/tests/plotting/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/plotting/common.py b/pandas/tests/plotting/common.py index c2dd37844486e..c2d42633bc50c 100644 --- a/pandas/tests/plotting/common.py +++ b/pandas/tests/plotting/common.py @@ -552,7 +552,7 @@ def is_grid_on(): obj.plot(kind=kind, grid=False, **kws) assert not is_grid_on() - if kind not in ["pie", "hexbin"]: + if kind not in ["pie", "hexbin", "scatterplot"]: self.plt.subplot(1, 4 * len(kinds), spndx) spndx += 1 mpl.rc("axes", grid=True) From ba51558c24fe081df7f0eb2e25cb21e7c66719fc Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Sat, 20 Nov 2021 17:53:37 -0800 Subject: [PATCH 5/5] Update common.py --- pandas/tests/plotting/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/plotting/common.py b/pandas/tests/plotting/common.py index c2d42633bc50c..ae9db5e728efe 100644 --- a/pandas/tests/plotting/common.py +++ b/pandas/tests/plotting/common.py @@ -552,7 +552,7 @@ def is_grid_on(): obj.plot(kind=kind, grid=False, **kws) assert not is_grid_on() - if kind not in ["pie", "hexbin", "scatterplot"]: + if kind not in ["pie", "hexbin", "scatter"]: self.plt.subplot(1, 4 * len(kinds), spndx) spndx += 1 mpl.rc("axes", grid=True)