File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -810,11 +810,32 @@ def test_triplot(self):
810810 fig , ax = plt .subplots ()
811811 ax .triplot (...)
812812
813- @pytest .mark .xfail ( reason = "Test for violin not written yet" )
813+ @pytest .mark .parametrize ( "orientation" , [ "vertical" , "horizontal" ] )
814814 @mpl .style .context ("default" )
815- def test_violin (self ):
815+ def test_violin (self , orientation ):
816816 fig , ax = plt .subplots ()
817- ax .violin (...)
817+ datetimes = [
818+ datetime .datetime (2023 , 2 , 10 ),
819+ datetime .datetime (2023 , 5 , 18 ),
820+ datetime .datetime (2023 , 6 , 6 )
821+ ]
822+ ax .violin (
823+ [
824+ {
825+ 'coords' : datetimes ,
826+ 'vals' : [0.1 , 0.5 , 0.2 ],
827+ 'mean' : datetimes [1 ],
828+ 'median' : datetimes [1 ],
829+ 'min' : datetimes [0 ],
830+ 'max' : datetimes [- 1 ],
831+ 'quantiles' : datetimes
832+ }
833+ ],
834+ orientation = orientation ,
835+ # TODO: It should be possible for positions to be datetimes too
836+ # https://github.com/matplotlib/matplotlib/issues/30417
837+ # positions=[datetime.datetime(2020, 1, 1)]
838+ )
818839
819840 @pytest .mark .xfail (reason = "Test for violinplot not written yet" )
820841 @mpl .style .context ("default" )
You can’t perform that action at this time.
0 commit comments