@@ -182,7 +182,7 @@ def test_plot_fails_with_dupe_color_and_style(self):
182
182
def test_hist_by_no_extra_plots (self ):
183
183
import matplotlib .pyplot as plt
184
184
n = 10
185
- df = DataFrame ({'gender' : tm . choice ( ['Male' , 'Female' ], size = n ) ,
185
+ df = DataFrame ({'gender' : ['Male' ] * 5 + [ 'Female' ] * 5 ,
186
186
'height' : random .normal (66 , 4 , size = n )})
187
187
axes = df .height .hist (by = df .gender )
188
188
self .assertEqual (len (plt .get_fignums ()), 1 )
@@ -593,9 +593,9 @@ def test_bar_linewidth(self):
593
593
@slow
594
594
def test_bar_barwidth (self ):
595
595
df = DataFrame (randn (5 , 5 ))
596
-
596
+
597
597
width = 0.9
598
-
598
+
599
599
# regular
600
600
ax = df .plot (kind = 'bar' , width = width )
601
601
for r in ax .patches :
@@ -681,7 +681,7 @@ def _check_bar_alignment(self, df, kind='bar', stacked=False,
681
681
align = align , width = width , position = position ,
682
682
grid = True )
683
683
684
- tick_pos = np .arange (len (df ))
684
+ tick_pos = np .arange (len (df ))
685
685
686
686
if not isinstance (axes , np .ndarray ):
687
687
axes = [axes ]
@@ -780,7 +780,7 @@ def test_bar_subplots_center(self):
780
780
self .assertEqual (ax .get_xlim (), (- 0.5 , 4.75 ))
781
781
782
782
self ._check_bar_alignment (df , kind = 'bar' , subplots = True , width = 0.9 )
783
-
783
+
784
784
axes = self ._check_bar_alignment (df , kind = 'barh' , subplots = True )
785
785
for ax in axes :
786
786
self .assertEqual (ax .get_ylim (), (- 0.5 , 4.75 ))
0 commit comments