Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7847c50

Browse files
committed
Merged revisions 7792 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7792 | efiring | 2009-09-19 13:46:06 -1000 (Sat, 19 Sep 2009) | 2 lines Fix bug in bar affecting autoscaling with log axis ........ svn path=/trunk/matplotlib/; revision=7793
1 parent 14d4c67 commit 7847c50

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _xy_from_xy(self, x, y):
204204
bx = self.axes.xaxis.update_units(x)
205205
by = self.axes.yaxis.update_units(y)
206206

207-
if self.command!='plot':
207+
if self.command!='plot':
208208
# the Line2D class can handle unitized data, with
209209
# support for post hoc unit changes etc. Other mpl
210210
# artists, eg Polygon which _process_plot_var_args
@@ -4179,13 +4179,6 @@ def make_iterable(x):
41794179
else:
41804180
raise ValueError, 'invalid orientation: %s' % orientation
41814181

4182-
4183-
# do not convert to array here as unit info is lost
4184-
#left = np.asarray(left)
4185-
#height = np.asarray(height)
4186-
#width = np.asarray(width)
4187-
#bottom = np.asarray(bottom)
4188-
41894182
if len(linewidth) < nbars:
41904183
linewidth *= nbars
41914184

@@ -4300,15 +4293,15 @@ def make_iterable(x):
43004293

43014294
if adjust_xlim:
43024295
xmin, xmax = self.dataLim.intervalx
4303-
xmin = np.amin(width[width!=0]) # filter out the 0 width rects
4296+
xmin = np.amin([w for w in width if w > 0])
43044297
if xerr is not None:
43054298
xmin = xmin - np.amax(xerr)
43064299
xmin = max(xmin*0.9, 1e-100)
43074300
self.dataLim.intervalx = (xmin, xmax)
43084301

43094302
if adjust_ylim:
43104303
ymin, ymax = self.dataLim.intervaly
4311-
ymin = np.amin(height[height!=0]) # filter out the 0 height rects
4304+
ymin = np.amin([h for h in height if h > 0])
43124305
if yerr is not None:
43134306
ymin = ymin - np.amax(yerr)
43144307
ymin = max(ymin*0.9, 1e-100)

0 commit comments

Comments
 (0)