@@ -3847,9 +3847,14 @@ def test_stem(use_line_collection):
38473847 fig , ax = plt .subplots ()
38483848 # Label is a single space to force a legend to be drawn, but to avoid any
38493849 # text being drawn
3850- ax .stem (x , np .cos (x ),
3851- linefmt = 'C2-.' , markerfmt = 'k+' , basefmt = 'C1-.' , label = ' ' ,
3852- use_line_collection = use_line_collection )
3850+ if use_line_collection :
3851+ ax .stem (x , np .cos (x ),
3852+ linefmt = 'C2-.' , markerfmt = 'k+' , basefmt = 'C1-.' , label = ' ' )
3853+ else :
3854+ with pytest .warns (match = 'deprecated' ):
3855+ ax .stem (x , np .cos (x ),
3856+ linefmt = 'C2-.' , markerfmt = 'k+' , basefmt = 'C1-.' , label = ' ' ,
3857+ use_line_collection = False )
38533858 ax .legend ()
38543859
38553860
@@ -3889,9 +3894,16 @@ def test_stem_orientation(use_line_collection):
38893894 x = np .linspace (0.1 , 2 * np .pi , 50 )
38903895
38913896 fig , ax = plt .subplots ()
3892- ax .stem (x , np .cos (x ),
3893- linefmt = 'C2-.' , markerfmt = 'kx' , basefmt = 'C1-.' ,
3894- use_line_collection = use_line_collection , orientation = 'horizontal' )
3897+ if use_line_collection :
3898+ ax .stem (x , np .cos (x ),
3899+ linefmt = 'C2-.' , markerfmt = 'kx' , basefmt = 'C1-.' ,
3900+ orientation = 'horizontal' )
3901+ else :
3902+ with pytest .warns (match = 'deprecated' ):
3903+ ax .stem (x , np .cos (x ),
3904+ linefmt = 'C2-.' , markerfmt = 'kx' , basefmt = 'C1-.' ,
3905+ use_line_collection = False ,
3906+ orientation = 'horizontal' )
38953907
38963908
38973909@image_comparison (['hist_stacked_stepfilled_alpha' ])
0 commit comments