@@ -186,6 +186,41 @@ def test_plot_1d_missing(self):
186186
187187 self .axis_test (ax .yaxis , self .dmticks , self .dmlabels , self .dmunit_data )
188188
189+ @cleanup
190+ @pytest .mark .usefixtures ("data" )
191+ @pytest .mark .parametrize ("bars" ,
192+ [['a' , 'b' , 'c' ],
193+ [b'a' , b'b' , b'c' ],
194+ np .array ([b'a' , b'b' , b'c' ])],
195+ ids = ['string list' , 'bytes list' ,
196+ 'bytes ndarray' ])
197+ def test_plot_bytes (self , bars ):
198+ counts = np .array ([4 , 6 , 5 ])
199+
200+ fig , ax = plt .subplots ()
201+ ax .bar (bars , counts )
202+ fig .canvas .draw ()
203+
204+ self .axis_test (ax .xaxis , self .dticks , self .dlabels , self .dunit_data )
205+
206+ @cleanup
207+ @pytest .mark .parametrize ("bars" ,
208+ [['1' , '11' , '3' ],
209+ np .array (['1' , '11' , '3' ]),
210+ [b'1' , b'11' , b'3' ],
211+ np .array ([b'1' , b'11' , b'3' ])],
212+ ids = ['string list' , 'string ndarray' ,
213+ 'bytes list' , 'bytes ndarray' ])
214+ def test_plot_numlike (self , bars ):
215+ counts = np .array ([4 , 6 , 5 ])
216+
217+ fig , ax = plt .subplots ()
218+ ax .bar (bars , counts )
219+ fig .canvas .draw ()
220+
221+ unitmap = MockUnitData ([('1' , 0 ), ('11' , 1 ), ('3' , 2 )])
222+ self .axis_test (ax .xaxis , [0 , 1 , 2 ], ['1' , '11' , '3' ], unitmap )
223+
189224 @cleanup
190225 @pytest .mark .usefixtures ("data" , "missing_data" )
191226 def test_plot_2d (self ):
0 commit comments