There was an error while loading. Please reload this page.
1 parent a99673c commit bc118a9Copy full SHA for bc118a9
1 file changed
lib/matplotlib/tests/test_datetime.py
@@ -170,11 +170,20 @@ def test_hexbin(self):
170
fig, ax = plt.subplots()
171
ax.hexbin(...)
172
173
- @pytest.mark.xfail(reason="Test for hist not written yet")
+ # Benjamin
174
+ # @pytest.mark.xfail(reason="Test for hist not written yet")
175
@mpl.style.context("default")
176
def test_hist(self):
- fig, ax = plt.subplots()
177
- ax.hist(...)
+ mpl.rcParams["date.converter"] = "concise"
178
+ N = 10
179
+ fig, (ax1, ax2, ax3) = plt.subplots(
180
+ 3, 1, layout="constrained", figsize=(6, 10)
181
+ )
182
+
183
+ x = np.array([datetime.datetime(2023, 9, n) for n in range(1, N)])
184
+ ax1.hist(x, range(1, N))
185
+ ax2.hist(range(1, N), x)
186
+ ax3.hist(x, x)
187
188
@pytest.mark.xfail(reason="Test for hist2d not written yet")
189
0 commit comments