8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 309981d + f319e35 commit 775fbc0Copy full SHA for 775fbc0
lib/matplotlib/tests/test_datetime.py
@@ -26,11 +26,19 @@ def test_arrow(self):
26
fig, ax = plt.subplots()
27
ax.arrow(...)
28
29
- @pytest.mark.xfail(reason="Test for axhline not written yet")
30
@mpl.style.context("default")
31
def test_axhline(self):
32
- fig, ax = plt.subplots()
33
- ax.axhline(...)
+ mpl.rcParams["date.converter"] = 'concise'
+ fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained')
+ ax1.set_ylim(bottom=datetime.datetime(2020, 4, 1),
34
+ top=datetime.datetime(2020, 8, 1))
35
+ ax2.set_ylim(bottom=np.datetime64('2005-01-01'),
36
+ top=np.datetime64('2005-04-01'))
37
+ ax3.set_ylim(bottom=datetime.datetime(2023, 9, 1),
38
+ top=datetime.datetime(2023, 11, 1))
39
+ ax1.axhline(y=datetime.datetime(2020, 6, 3), xmin=0.5, xmax=0.7)
40
+ ax2.axhline(np.datetime64('2005-02-25T03:30'), xmin=0.1, xmax=0.9)
41
+ ax3.axhline(y=datetime.datetime(2023, 10, 24), xmin=0.4, xmax=0.7)
42
43
44
def test_axhspan(self):
0 commit comments