Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added smoke test for Axes.imshow to test_datetime.py #27476

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 2 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/matplotlib/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,15 @@ def test_hlines(self):
xmin=0.45,
xmax=0.65)

@pytest.mark.xfail(reason="Test for imshow not written yet")
@mpl.style.context("default")
def test_imshow(self):
fig, ax = plt.subplots()
ax.imshow(...)
a = np.diag(range(5))
dt_start = datetime.datetime(2010, 11, 1)
dt_end = datetime.datetime(2010, 11, 11)
extent = (dt_start, dt_end, dt_start, dt_end)
ax.imshow(a, extent=extent)
ax.tick_params(axis="x", labelrotation=90)

@pytest.mark.xfail(reason="Test for loglog not written yet")
@mpl.style.context("default")
Expand Down