diff --git a/pandas/tests/plotting/test_frame.py b/pandas/tests/plotting/test_frame.py index e6a61d35365a3..48a923e85eed7 100644 --- a/pandas/tests/plotting/test_frame.py +++ b/pandas/tests/plotting/test_frame.py @@ -2650,11 +2650,20 @@ def test_pie_df(self): self._check_colors(ax.patches, facecolors=color_args) def test_pie_df_nan(self): + import matplotlib as mpl + df = DataFrame(np.random.rand(4, 4)) for i in range(4): df.iloc[i, i] = np.nan fig, axes = self.plt.subplots(ncols=4) - df.plot.pie(subplots=True, ax=axes, legend=True) + + # GH 37668 + kwargs = {} + if mpl.__version__ >= "3.3": + kwargs = {"normalize": True} + + with tm.assert_produces_warning(None): + df.plot.pie(subplots=True, ax=axes, legend=True, **kwargs) base_expected = ["0", "1", "2", "3"] for i, ax in enumerate(axes):