@@ -2190,39 +2190,17 @@ 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 :
22002196 self .set_yscale ('log' , nonposy = 'clip' )
2201-
2202- tick_label_axis = self .xaxis
2203- tick_label_position = x
22042197 elif orientation == 'horizontal' :
22052198 self ._process_unit_info (xdata = width , ydata = y , kwargs = kwargs )
22062199 if log :
22072200 self .set_xscale ('log' , nonposx = 'clip' )
2208-
2209- tick_label_axis = self .yaxis
2210- tick_label_position = y
22112201 else :
22122202 raise ValueError ('invalid orientation: %s' % orientation )
22132203
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-
22262204 # lets do some conversions now since some types cannot be
22272205 # subtracted uniformly
22282206 if self .xaxis is not None :
@@ -2237,6 +2215,30 @@ def bar(self, *args, **kwargs):
22372215 if yerr is not None :
22382216 yerr = self .convert_yunits (yerr )
22392217
2218+ x , height , width , y , linewidth = np .broadcast_arrays (
2219+ # Make args iterable too.
2220+ np .atleast_1d (x ), height , width , y , linewidth )
2221+
2222+ # Now that units have been converted, set the tick locations.
2223+ if orientation == 'vertical' :
2224+ tick_label_axis = self .xaxis
2225+ tick_label_position = x
2226+ elif orientation == 'horizontal' :
2227+ tick_label_axis = self .yaxis
2228+ tick_label_position = y
2229+
2230+ linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2231+ color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2232+ # Fallback if color == "none".
2233+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2234+ if edgecolor is None :
2235+ edgecolor = itertools .repeat (None )
2236+ else :
2237+ edgecolor = itertools .chain (
2238+ itertools .cycle (mcolors .to_rgba_array (edgecolor )),
2239+ # Fallback if edgecolor == "none".
2240+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2241+
22402242 # We will now resolve the alignment and really have
22412243 # left, bottom, width, height vectors
22422244 if align == 'center' :
0 commit comments