@@ -2061,35 +2061,36 @@ def bar(self, *args, **kwargs):
2061
2061
label = kwargs .pop ('label' , '' )
2062
2062
tick_labels = kwargs .pop ('tick_label' , None )
2063
2063
2064
- _x = x
2065
- _y = y
2064
+ adjust_ylim = False
2065
+ adjust_xlim = False
2066
+
2067
+ if orientation == 'vertical' :
2068
+ if y is None :
2069
+ if self .get_yscale () == 'log' :
2070
+ adjust_ylim = True
2071
+ y = 0
2072
+
2073
+ elif orientation == 'horizontal' :
2074
+ if x is None :
2075
+ if self .get_xscale () == 'log' :
2076
+ adjust_xlim = True
2077
+ x = 0
2078
+
2066
2079
x , height , width , y , linewidth = np .broadcast_arrays (
2067
2080
# Make args iterable too.
2068
2081
np .atleast_1d (x ), height , width , y , linewidth )
2069
2082
2070
- adjust_ylim = False
2071
- adjust_xlim = False
2072
2083
if orientation == 'vertical' :
2073
2084
self ._process_unit_info (xdata = x , ydata = height , kwargs = kwargs )
2074
2085
if log :
2075
2086
self .set_yscale ('log' , nonposy = 'clip' )
2076
- # size width and y according to length of x
2077
- if _y is None :
2078
- if self .get_yscale () == 'log' :
2079
- adjust_ylim = True
2080
- y = np .zeros_like (y )
2081
2087
2082
2088
tick_label_axis = self .xaxis
2083
2089
tick_label_position = x
2084
2090
elif orientation == 'horizontal' :
2085
2091
self ._process_unit_info (xdata = width , ydata = y , kwargs = kwargs )
2086
2092
if log :
2087
2093
self .set_xscale ('log' , nonposx = 'clip' )
2088
- # size x and height according to length of y
2089
- if _x is None :
2090
- if self .get_xscale () == 'log' :
2091
- adjust_xlim = True
2092
- x = np .zeros_like (x )
2093
2094
2094
2095
tick_label_axis = self .yaxis
2095
2096
tick_label_position = y
0 commit comments