@@ -2190,10 +2190,6 @@ def bar(self, *args, **kwargs):
21902190 adjust_xlim = True
21912191 x = 0
21922192
2193- x , height , width , y , linewidth = np .broadcast_arrays (
2194- # Make args iterable too.
2195- np .atleast_1d (x ), height , width , y , linewidth )
2196-
21972193 if orientation == 'vertical' :
21982194 self ._process_unit_info (xdata = x , ydata = height , kwargs = kwargs )
21992195 if log :
@@ -2211,18 +2207,6 @@ def bar(self, *args, **kwargs):
22112207 else :
22122208 raise ValueError ('invalid orientation: %s' % orientation )
22132209
2214- linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2215- color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2216- # Fallback if color == "none".
2217- itertools .repeat ([0 , 0 , 0 , 0 ]))
2218- if edgecolor is None :
2219- edgecolor = itertools .repeat (None )
2220- else :
2221- edgecolor = itertools .chain (
2222- itertools .cycle (mcolors .to_rgba_array (edgecolor )),
2223- # Fallback if edgecolor == "none".
2224- itertools .repeat ([0 , 0 , 0 , 0 ]))
2225-
22262210 # lets do some conversions now since some types cannot be
22272211 # subtracted uniformly
22282212 if self .xaxis is not None :
@@ -2237,6 +2221,22 @@ def bar(self, *args, **kwargs):
22372221 if yerr is not None :
22382222 yerr = self .convert_yunits (yerr )
22392223
2224+ x , height , width , y , linewidth = np .broadcast_arrays (
2225+ # Make args iterable too.
2226+ np .atleast_1d (x ), height , width , y , linewidth )
2227+
2228+ linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2229+ color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2230+ # Fallback if color == "none".
2231+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2232+ if edgecolor is None :
2233+ edgecolor = itertools .repeat (None )
2234+ else :
2235+ edgecolor = itertools .chain (
2236+ itertools .cycle (mcolors .to_rgba_array (edgecolor )),
2237+ # Fallback if edgecolor == "none".
2238+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2239+
22402240 # We will now resolve the alignment and really have
22412241 # left, bottom, width, height vectors
22422242 if align == 'center' :
0 commit comments