@@ -410,13 +410,18 @@ def test_boxplot_group_no_xlabel_ylabel(self, vert, request):
410
410
assert target_label == pprint_thing (["group" ])
411
411
412
412
@pytest .mark .filterwarnings ("ignore:set_ticklabels:UserWarning" )
413
- def test_boxplot_group_xlabel_ylabel (self , vert ):
414
- df = DataFrame ({'value' : [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ],
415
- 'label' : ['c' , 'c' , 'c' , 'c' , 'b' , 'b' , 'b' , 'b' , 'a' , 'a' ]})
416
- df .label = Categorical (df .label , categories = ['c' , 'b' , 'a' ], ordered = True )
413
+ def test_boxplot_group_ordered_ticklabel (self , vert ):
414
+ df = DataFrame (
415
+ {
416
+ "value" : [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ],
417
+ "label" : ["c" , "c" , "c" , "c" , "b" , "b" , "b" , "b" , "a" , "a" ],
418
+ }
419
+ )
420
+ df .label = Categorical (df .label , categories = ["c" , "b" , "a" ], ordered = True )
417
421
ax = df .boxplot (by = "label" )
418
422
xticklabels = ax .get_xticklabels ()
419
- assert [x .get_text () for x in xticklabels ] == ['c' , 'b' , 'a' ]
423
+ assert [x .get_text () for x in xticklabels ] == ["c" , "b" , "a" ]
424
+
420
425
421
426
class TestDataFrameGroupByPlots :
422
427
def test_boxplot_legacy1 (self , hist_df ):
0 commit comments