@@ -355,11 +355,33 @@ def test_streamplot(self):
355355 fig , ax = plt .subplots ()
356356 ax .streamplot (...)
357357
358- @pytest .mark .xfail (reason = "Test for text not written yet" )
359358 @mpl .style .context ("default" )
360359 def test_text (self ):
361- fig , ax = plt .subplots ()
362- ax .text (...)
360+ mpl .rcParams ["date.converter" ] = 'concise'
361+ fig , (ax1 , ax2 , ax3 ) = plt .subplots (3 , 1 , layout = "constrained" )
362+
363+ limit_value = 10
364+ font_properties = {'family' : 'serif' , 'size' : 12 , 'weight' : 'bold' }
365+ test_date = datetime .datetime (2023 , 10 , 1 )
366+
367+ x_data = np .array (range (1 , limit_value ))
368+ y_data = np<
A8B2
/span>.array (range (1 , limit_value ))
369+
370+ x_dates = np .array (
371+ [datetime .datetime (2023 , 10 , n ) for n in range (1 , limit_value )]
372+ )
373+ y_dates = np .array (
374+ [datetime .datetime (2023 , 10 , n ) for n in range (1 , limit_value )]
375+ )
376+
377+ ax1 .plot (x_dates , y_data )
378+ ax1 .text (test_date , 5 , "Inserted Text" , ** font_properties )
379+
380+ ax2 .plot (x_data , y_dates )
381+ ax2 .text (7 , test_date , "Inserted Text" , ** font_properties )
382+
383+ ax3 .plot (x_dates , y_dates )
384+ ax3 .text (test_date , test_date , "Inserted Text" , ** font_properties )
363385
364386 @pytest .mark .xfail (reason = "Test for tricontour not written yet" )
365387 @mpl .style .context ("default" )
0 commit comments