@@ -520,11 +520,22 @@ def test_quiver(self):
520520 fig , ax = plt .subplots ()
521521 ax .quiver (...)
522522
523- @pytest .mark .xfail (reason = "Test for quiverkey not written yet" )
524523 @mpl .style .context ("default" )
525524 def test_quiverkey (self ):
526- fig , ax = plt .subplots ()
527- ax .quiverkey (...)
525+ mpl .rcParams ["date.converter" ] = 'concise'
526+ x = np .arange (np .datetime64 ('2023-12-01' ), np .datetime64 ('2023-12-06' ))
527+ y = 10 ** np .arange (5 )
528+ u = np .sin (np .arange (len (x )))
529+ v = np .cos (np .arange (len (x )))
530+ fig , ax = plt .subplots (figsize = (10 , 6 ))
531+ ax .set_title ('Quiverplot with Datetime' )
532+ ax .set_xlabel ('Date' )
533+ ax .set_ylabel ('Y-axis' )
534+ q = ax .quiver (x , y , u , v , scale = 20 )
535+ ax .quiverkey (q , .085 , .05 , 1 , x [0 ], labelpos = 'N' , coordinates = 'figure' )
536+ ax .quiverkey (q , .085 , .92 , 1 , x [1 ], labelpos = 'S' , coordinates = 'figure' )
537+ ax .quiverkey (q , .85 , .05 , 1 , x [2 ], labelpos = 'W' , coordinates = 'figure' )
538+ ax .quiverkey (q , .8 , .9 , 1 , x [3 ], labelpos = 'E' , coordinates = 'figure' )
528539
529540 @mpl .style .context ("default" )
530541 def test_scatter (self ):
0 commit comments