Skip to content

Commit 799ab49

Browse files
QuLogiclithomas1
authored andcommitted
Remove deprecated plot_date calls (#58484)
* Remove deprecated plot_date calls These were deprecated in Matplotlib 3.9. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit c9bc480)
1 parent 2308e7c commit 799ab49

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

pandas/tests/plotting/test_datetimelike.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -1451,13 +1451,19 @@ def test_mpl_nopandas(self):
14511451
values1 = np.arange(10.0, 11.0, 0.5)
14521452
values2 = np.arange(11.0, 12.0, 0.5)
14531453

1454-
kw = {"fmt": "-", "lw": 4}
1455-
14561454
_, ax = mpl.pyplot.subplots()
1457-
ax.plot_date([x.toordinal() for x in dates], values1, **kw)
1458-
ax.plot_date([x.toordinal() for x in dates], values2, **kw)
1459-
1460-
line1, line2 = ax.get_lines()
1455+
(
1456+
line1,
1457+
line2,
1458+
) = ax.plot(
1459+
[x.toordinal() for x in dates],
1460+
values1,
1461+
"-",
1462+
[x.toordinal() for x in dates],
1463+
values2,
1464+
"-",
1465+
linewidth=4,
1466+
)
14611467

14621468
exp = np.array([x.toordinal() for x in dates], dtype=np.float64)
14631469
tm.assert_numpy_array_equal(line1.get_xydata()[:, 0], exp)

0 commit comments

Comments
 (0)