diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index 104a649e1464..a77f853eb70c 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -224,8 +224,17 @@ def test_barh(self): @pytest.mark.xfail(reason="Test for boxplot not written yet") @mpl.style.context("default") def test_boxplot(self): - fig, ax = plt.subplots() - ax.boxplot(...) + data = [datetime.datetime(2023, 10, 5, 18, 52, 59), + datetime.datetime(2023, 10, 4, 18, 53, 0), + datetime.datetime(2023, 10, 3, 18, 53, 1), + datetime.datetime(2023, 10, 2, 18, 53, 2), + datetime.datetime(2023, 10, 1, 18, 53, 3)] + datums = np.array([datetime.datetime.toordinal(d) for d in data]) + plt.boxplot(datums, labels=['my data'], showfliers=True) + plt.xlabel('Datetime') + plt.ylabel('value') + plt.title('Boxplot of datetime data') + plt.show() @mpl.style.context("default") def test_broken_barh(self): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy