diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index ef83b837348d..b21ff1bb7202 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -318,11 +318,15 @@ def test_spy(self): fig, ax = plt.subplots() ax.spy(...) - @pytest.mark.xfail(reason="Test for stackplot not written yet") @mpl.style.context("default") def test_stackplot(self): - fig, ax = plt.subplots() - ax.stackplot(...) + mpl.rcParams["date.converter"] = 'concise' + N = 10 + stacked_nums = np.tile(np.arange(1, N), (4, 1)) + dates = np.array([datetime.datetime(2020 + i, 1, 1) for i in range(N - 1)]) + + fig, ax = plt.subplots(layout='constrained') + ax.stackplot(dates, stacked_nums) @pytest.mark.xfail(reason="Test for stairs not written yet") @mpl.style.context("default")