Revision: 7792
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7792&view=rev
Author:   efiring
Date:     2009-09-19 23:46:06 +0000 (Sat, 19 Sep 2009)

Log Message:
-----------
Fix bug in bar affecting autoscaling with log axis

Modified Paths:
--------------
    branches/v0_99_maint/lib/matplotlib/axes.py

Modified: branches/v0_99_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/axes.py 2009-09-19 06:32:38 UTC (rev 
7791)
+++ branches/v0_99_maint/lib/matplotlib/axes.py 2009-09-19 23:46:06 UTC (rev 
7792)
@@ -204,7 +204,7 @@
             bx = self.axes.xaxis.update_units(x)
             by = self.axes.yaxis.update_units(y)
 
-           if self.command!='plot':
+            if self.command!='plot':
                 # the Line2D class can handle unitized data, with
                 # support for post hoc unit changes etc.  Other mpl
                 # artists, eg Polygon which _process_plot_var_args
@@ -4213,13 +4213,6 @@
         else:
             raise ValueError, 'invalid orientation: %s' % orientation
 
-
-        # do not convert to array here as unit info is lost
-        #left = np.asarray(left)
-        #height = np.asarray(height)
-        #width = np.asarray(width)
-        #bottom = np.asarray(bottom)
-
         if len(linewidth) < nbars:
             linewidth *= nbars
 
@@ -4334,7 +4327,7 @@
 
         if adjust_xlim:
             xmin, xmax = self.dataLim.intervalx
-            xmin = np.amin(width[width!=0]) # filter out the 0 width rects
+            xmin = np.amin([w for w in width if w > 0])
             if xerr is not None:
                 xmin = xmin - np.amax(xerr)
             xmin = max(xmin*0.9, 1e-100)
@@ -4342,7 +4335,7 @@
 
         if adjust_ylim:
             ymin, ymax = self.dataLim.intervaly
-            ymin = np.amin(height[height!=0]) # filter out the 0 height rects
+            ymin = np.amin([h for h in height if h > 0])
             if yerr is not None:
                 ymin = ymin - np.amax(yerr)
             ymin = max(ymin*0.9, 1e-100)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to