diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py index dbe728f5238c7..979b89a87d843 100644 --- a/pandas/tests/plotting/test_datetimelike.py +++ b/pandas/tests/plotting/test_datetimelike.py @@ -45,12 +45,17 @@ def teardown_method(self, method): @pytest.mark.slow def test_ts_plot_with_tz(self, tz_aware_fixture): - # GH2877, GH17173, GH31205 + # GH2877, GH17173, GH31205, GH31580 tz = tz_aware_fixture index = date_range("1/1/2011", periods=2, freq="H", tz=tz) ts = Series([188.5, 328.25], index=index) with tm.assert_produces_warning(None): _check_plot_works(ts.plot) + ax = ts.plot() + xdata = list(ax.get_lines())[0].get_xdata() + # Check first and last points' labels are correct + assert (xdata[0].hour, xdata[0].minute) == (0, 0) + assert (xdata[-1].hour, xdata[-1].minute) == (1, 0) def test_fontsize_set_correctly(self): # For issue #8765