@@ -44,11 +44,19 @@ def test_axline(self):
44
44
fig , ax = plt .subplots ()
45
45
ax .axline (...)
46
46
47
- @pytest .mark .xfail (reason = "Test for axvline not written yet" )
48
47
@mpl .style .context ("default" )
49
48
def test_axvline (self ):
50
- fig , ax = plt .subplots ()
51
- ax .axvline (...)
49
+ mpl .rcParams ["date.converter" ] = 'concise'
50
+ fig , (ax1 , ax2 , ax3 ) = plt .subplots (3 , 1 , layout = 'constrained' )
51
+ ax1 .set_xlim (left = datetime .datetime (2020 , 4 , 1 ),
52
+ right = datetime .datetime (2020 , 8 , 1 ))
53
+ ax2 .set_xlim (left = np .datetime64 ('2005-01-01' ),
54
+ right = np .datetime64 ('2005-04-01' ))
55
+ ax3 .set_xlim (left = datetime .datetime (2023 , 9 , 1 ),
56
+ right = datetime .datetime (2023 , 11 , 1 ))
57
+ ax1 .axvline (x = datetime .datetime (2020 , 6 , 3 ), ymin = 0.5 , ymax = 0.7 )
58
+ ax2 .axvline (np .datetime64 ('2005-02-25T03:30' ), ymin = 0.1 , ymax = 0.9 )
59
+ ax3 .axvline (x = datetime .datetime (2023 , 10 , 24 ), ymin = 0.4 , ymax = 0.7 )
52
60
53
61
@pytest .mark .xfail (reason = "Test for axvspan not written yet" )
54
62
@mpl .style .context ("default" )
0 commit comments