8000 Assorted backports for 2.2.x by lithomas1 · Pull Request #59785 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Assorted backports for 2.2.x #59785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Prev Previous commit
Next Next commit
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)
  • Loading branch information
2 people authored and lithomas1 committed Sep 12, 2024
commit 799ab4997f93d12453f78e10e3f6a9c1e6d0f5bc
18 changes: 12 additions & 6 deletions pandas/tests/plotting/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,13 +1451,19 @@ def test_mpl_nopandas(self):
values1 = np.arange(10.0, 11.0, 0.5)
values2 = np.arange(11.0, 12.0, 0.5)

kw = {"fmt": "-", "lw": 4}

_, ax = mpl.pyplot.subplots()
ax.plot_date([x.toordinal() for x in dates], values1, **kw)
ax.plot_date([x.toordinal() for x in dates], values2, **kw)

line1, line2 = ax.get_lines()
(
line1,
line2,
) = ax.plot(
[x.toordinal() for x in dates],
values1,
"-",
[x.toordinal() for x in dates],
values2,
"-",
linewidth=4,
)

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