@@ -26,12 +26,18 @@ def test_arrow(self):
26
26
fig , ax = plt .subplots ()
27
27
ax .arrow (...)
28
28
29
- @pytest .mark .xfail (reason = "Test for axhline not written yet" )
30
29
@mpl .style .context ("default" )
31
30
def test_axhline (self ):
32
31
mpl .rcParams ["date.converter" ] = 'concise'
33
- fig , ax = plt .subplots (layout = 'constrained' )
34
- ax .axhline (y = datetime .datetime (2020 , 6 , 1 ), xmin = 0.2 , xmax = 0.8 )
32
+ fig , (ax1 , ax2 , ax3 ) = plt .subplots (3 , 1 , layout = 'constrained' )
33
+ 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 )
35
41
36
42
@pytest .mark .xfail (reason = "Test for axhspan not written yet" )
37
43
@mpl .style .context ("default" )
0 commit comments