@@ -199,12 +199,12 @@ def test_plot(self):
199
199
(u'\u03b3 ' , 5 ),
200
200
(u'\u03b4 ' , 6 ),
201
201
(u'\u03b4 ' , 7 )], names = ['i0' , 'i1' ])
202
- columns = pandas . MultiIndex .from_tuples ([('bar' , u'\u0394 ' ),
202
+ columns = MultiIndex .from_tuples ([('bar' , u'\u0394 ' ),
203
203
('bar' , u'\u0395 ' )], names = ['c0' , 'c1' ])
204
- df = pandas . DataFrame (np .random .randint (0 , 10 , (8 , 2 )),
205
- columns = columns ,
206
- index = index )
207
- df .plot ( title = u'\u03A3 ' )
204
+ df = DataFrame (np .random .randint (0 , 10 , (8 , 2 )),
205
+ columns = columns ,
206
+ index = index )
207
+ _check_plot_works ( df .plot , title = u'\u03A3 ' )
208
208
209
209
@slow
210
210
def test_plot_xy (self ):
@@ -429,22 +429,17 @@ def _check_plot_fails(self, f, *args, **kwargs):
429
429
def test_style_by_column (self ):
430
430
import matplotlib .pyplot as plt
431
431
fig = plt .gcf ()
432
- fig .clf ()
433
- fig .add_subplot (111 )
434
432
435
433
df = DataFrame (np .random .randn (100 , 3 ))
436
- markers = {0 : '^' , 1 : '+' , 2 : 'o' }
437
- ax = df .plot (style = markers )
438
- for i , l in enumerate (ax .get_lines ()):
439
- self .assertEqual (l .get_marker (), markers [i ])
440
-
441
- fig .clf ()
442
- fig .add_subplot (111 )
443
- df = DataFrame (np .random .randn (100 , 3 ))
444
- markers = ['^' , '+' , 'o' ]
445
- ax = df .plot (style = markers )
446
- for i , l in enumerate (ax .get_lines ()):
447
- self .assertEqual (l .get_marker (), markers [i ])
434
+ for markers in [{0 : '^' , 1 : '+' , 2 : 'o' },
435
+ {0 : '^' , 1 : '+' },
436
+ ['^' , '+' , 'o' ],
437
+ ['^' , '+' ]]:
438
+ fig .clf ()
439
+ fig .add_subplot (111 )
440
+ ax = df .plot (style = markers )
441
+ for i , l in enumerate (ax .get_lines ()[:len (markers )]):
442
+ self .assertEqual (l .get_marker (), markers [i ])
448
443
449
444
class TestDataFrameGroupByPlots (unittest .TestCase ):
450
445
0 commit comments