Skip to content

Commit c9bc480

Browse files
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>
1 parent 53b7f24 commit c9bc480

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
@@ -1432,13 +1432,19 @@ def test_mpl_nopandas(self):
14321432
values1 = np.arange(10.0, 11.0, 0.5)
14331433
values2 = np.arange(11.0, 12.0, 0.5)
14341434

1435-
kw = {"fmt": "-", "lw": 4}
1436-
14371435
_, ax = mpl.pyplot.subplots()
1438-
ax.plot_date([x.toordinal() for x in dates], values1, **kw)
1439-
ax.plot_date([x.toordinal() for x in dates], values2, **kw)
1440-
1441-
line1, line2 = ax.get_lines()
1436+
(
1437+
line1,
1438+
line2,
1439+
) = ax.plot(
1440+
[x.toordinal() for x in dates],
1441+
values1,
1442+
"-",
1443+
[x.toordinal() for x in dates],
1444+
values2,
1445+
"-",
1446+
linewidth=4,
1447+
)
14421448

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

0 commit comments

Comments
 (0)