We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68e5b4c commit 4f56b2dCopy full SHA for 4f56b2d
pandas/tests/plotting/test_frame.py
@@ -2650,11 +2650,20 @@ def test_pie_df(self):
2650
self._check_colors(ax.patches, facecolors=color_args)
2651
2652
def test_pie_df_nan(self):
2653
+ import matplotlib as mpl
2654
+
2655
df = DataFrame(np.random.rand(4, 4))
2656
for i in range(4):
2657
df.iloc[i, i] = np.nan
2658
fig, axes = self.plt.subplots(ncols=4)
- df.plot.pie(subplots=True, ax=axes, legend=True)
2659
2660
+ # GH 37668
2661
+ kwargs = {}
2662
+ if mpl.__version__ >= "3.3":
2663
+ kwargs = {"normalize": True}
2664
2665
+ with tm.assert_produces_warning(None):
2666
+ df.plot.pie(subplots=True, ax=axes, legend=True, **kwargs)
2667
2668
base_expected = ["0", "1", "2", "3"]
2669
for i, ax in enumerate(axes):
0 commit comments