33import nose , nose .tools as nt
44import numpy .testing as nptest
55
6+
67import matplotlib
78matplotlib .use ('Agg' )
89import matplotlib .pyplot as plt
@@ -20,20 +21,22 @@ def test_markevery():
2021 # check marker only plot
2122 fig = plt .figure ()
2223 ax = fig .add_subplot (111 )
23- ax .plot (x , y , 'o' )
24- ax .plot (x , y , 'd' , markevery = None )
25- ax .plot (x , y , 's' , markevery = 10 )
26- ax .plot (x , y , '+' , markevery = (5 , 20 ))
24+ ax .plot (x , y , 'o' , label = 'default' )
25+ ax .plot (x , y , 'd' , markevery = None , label = 'mark all' )
26+ ax .plot (x , y , 's' , markevery = 10 , label = 'mark every 10' )
27+ ax .plot (x , y , '+' , markevery = (5 , 20 ), label = 'mark every 5 starting at 10' )
28+ ax .legend ()
2729 fig .canvas .draw ()
2830 plt .close (fig )
2931
3032 # check line/marker combos
3133 fig = plt .figure ()
3234 ax = fig .add_subplot (111 )
33- ax .plot (x , y , '-o' )
34- ax .plot (x , y , '-d' , markevery = None )
35- ax .plot (x , y , '-s' , markevery = 10 )
36- ax .plot (x , y , '-+' , markevery = (5 , 20 ))
35+ ax .plot (x , y , '-o' , label = 'default' )
36+ ax .plot (x , y , '-d' , markevery = None , label = 'mark all' )
37+ ax .plot (x , y , '-s' , markevery = 10 , label = 'mark every 10' )
38+ ax .plot (x , y , '-+' , markevery = (5 , 20 ), label = 'mark every 5 starting at 10' )
39+ ax .legend ()
3740 fig .canvas .draw ()
3841 plt .close (fig )
3942
0 commit comments