@@ -2189,39 +2189,17 @@ def bar(self, *args, **kwargs):
21892189 adjust_xlim = True
21902190 x = 0
21912191
2192- x , height , width , y , linewidth = np .broadcast_arrays (
2193- # Make args iterable too.
2194- np .atleast_1d (x ), height , width , y , linewidth )
2195-
21962192 if orientation == 'vertical' :
21972193 self ._process_unit_info (xdata = x , ydata = height , kwargs = kwargs )
21982194 if log :
21992195 self .set_yscale ('log' , nonposy = 'clip' )
2200-
2201- tick_label_axis = self .xaxis
2202- tick_label_position = x
22032196 elif orientation == 'horizontal' :
22042197 self ._process_unit_info (xdata = width , ydata = y , kwargs = kwargs )
22052198 if log :
22062199 self .set_xscale ('log' , nonposx = 'clip' )
2207-
2208- tick_label_axis = self .yaxis
2209- tick_label_position = y
22102200 else :
22112201 raise ValueError ('invalid orientation: %s' % orientation )
22122202
2213- linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2214- color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2215- # Fallback if color == "none".
2216- itertools .repeat ([0 , 0 , 0 , 0 ]))
2217- if edgecolor is None :
2218- edgecolor = itertools .repeat (None )
2219- else :
2220- edgecolor = itertools .chain (
2221- itertools .cycle (mcolors .to_rgba_array (edgecolor )),
2222- # Fallback if edgecolor == "none".
2223- itertools .repeat ([0 , 0 , 0 , 0 ]))
2224-
22252203 # lets do some conversions now since some types cannot be
22262204 # subtracted uniformly
22272205 if self .xaxis is not None :
@@ -2236,6 +2214,30 @@ def bar(self, *args, **kwargs):
22362214 if yerr is not None :
22372215 yerr = self .convert_yunits (yerr )
22382216
2217+ x , height , width , y , linewidth = np .broadcast_arrays (
2218+ # Make args iterable too.
2219+ np .atleast_1d (x ), height , width , y , linewidth )
2220+
2221+ # Now that units have been converted, set the tick locations.
2222+ if orientation == 'vertical' :
2223+ tick_label_axis = self .xaxis
2224+ tick_label_position = x
2225+ elif orientation == 'horizontal' :
2226+ tick_label_axis = self .yaxis
2227+ tick_label_position = y
2228+
2229+ linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2230+ color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2231+ # Fallback if color == "none".
2232+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2233+ if edgecolor is None :
2234+ edgecolor = itertools .repeat (None )
2235+ else :
2236+ edgecolor = itertools .chain (
2237+ itertools .cycle (mcolors .to_rgba_array (edgecolor )),
2238+ # Fallback if edgecolor == "none".
2239+ itertools .repeat ([0 , 0 , 0 , 0 ]))
2240+
22392241 # We will now resolve the alignment and really have
22402242 # left, bottom, width, height vectors
22412243 if align == 'center' :
0 commit comments