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

Skip to content
Open
Changes from 4 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
19 changes: 16 additions & 3 deletions lib/matplotlib/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,23 @@ def test_fill_betweenx(self):
ax2.fill_betweenx(y_dates, x_values1, x_values2)
ax3.fill_betweenx(y_dates, x_dates1, x_dates2)

@pytest.mark.xfail(reason="Test for hexbin not written yet")
@mpl.style.context("default")
def test_hexbin(self):
fig, ax = plt.subplots()
ax.hexbin(...)

mpl.rcParams["date.converter"] = 'concise'
np.random.seed(19680801)

dates = np.arange(np.datetime64('2022-01-01'), np.datetime64('2023-12-31'),
np.timedelta64(1, 'D'))
fig, (ax0, ax1, ax2) = plt.subplots(3, 1)
fig.set_size_inches(4, 8)

n = dates.shape
x = np.random.standard_normal(n)
y = np.random.standard_normal(n)
ax0.hexbin(dates, y, gridsize=(5, 3))
ax1.hexbin(x, dates, gridsize=(5, 3))
ax2.hexbin(dates, dates, gridsize=(5, 3))

@mpl.style.context("default")
def test_hist(self):
Expand Down Expand Up @@ -738,6 +750,7 @@ def test_tricontourf(self):
@pytest.mark.xfail(reason="Test for tripcolor not written yet")
@mpl.style.context("default")
def test_tripcolor(self):
mpl.rcParams["date.converter"] = 'concise'
fig, ax = plt.subplots()
ax.tripcolor(...)

Expand Down