@@ -2194,16 +2194,10 @@ def bar(self, *args, **kwargs):
2194
2194
self ._process_unit_info (xdata = x , ydata = height , kwargs = kwargs )
2195
2195
if log :
2196
2196
self .set_yscale ('log' , nonposy = 'clip' )
2197
-
2198
- tick_label_axis = self .xaxis
2199
- tick_label_position = x
2200
2197
elif orientation == 'horizontal' :
2201
2198
self ._process_unit_info (xdata = width , ydata = y , kwargs = kwargs )
2202
2199
if log :
2203
2200
self .set_xscale ('log' , nonposx = 'clip' )
2204
-
2205
- tick_label_axis = self .yaxis
2206
- tick_label_position = y
2207
2201
else :
2208
2202
raise ValueError ('invalid orientation: %s' % orientation )
2209
2203
@@ -2225,6 +2219,14 @@ def bar(self, *args, **kwargs):
2225
2219
# Make args iterable too.
2226
2220
np .atleast_1d (x ), height , width , y , linewidth )
2227
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
+
2228
2230
linewidth = itertools .cycle (np .atleast_1d (linewidth ))
2229
2231
color = itertools .chain (itertools .cycle (mcolors .to_rgba_array (color )),
2230
2232
# Fallback if color == "none".
0 commit comments