Whoops, yes, that should be True... Also realized a slight error in
the description of how the mimum is set - both of those are fixed in
the attached diff.

On Tue, Aug 24, 2010 at 1:53 PM, Eric Firing <efir...@hawaii.edu> wrote:
> On 08/24/2010 08:39 AM, Erik Tollerud wrote:
>> I just realized the patch I sent before includes some other changes...
>> the attached version should only be the fix for this particular bug.
>
> +            if log is true:
> +                minimum = 1.0
>
>
> Don't you mean True, not true?
>
> Eric
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>



-- 
Erik Tollerud
Index: axes.py
===================================================================
--- axes.py	(revision 8655)
+++ axes.py	(working copy)
@@ -7492,11 +7492,14 @@
               - 'barstacked' is a bar-type histogram where multiple
                 data are stacked on top of each other.
 
-              - 'step' generates a lineplot that is by default
-                unfilled.
+              - 'step' is a histogram outlined by a lineplot with unfilled
+                patches. Toutlines only follow the top of the histogram, and 
+                hence *rwidth* has no effect.
 
-              - 'stepfilled' generates a lineplot that is by default
-                filled.
+              - 'stepfilled' is a histogram bounded by a lineplot with filled
+                patches underneath. This is distinct from 'bar' in that the
+                outlines only follow the top of the histogram, and hence
+                *rwidth* has no effect.
 
           *align*: ['left' | 'mid' | 'right' ]
             Controls how the histogram is plotted.
@@ -7521,7 +7524,10 @@
             If *True*, the histogram axis will be set to a log scale.
             If *log* is *True* and *x* is a 1D array, empty bins will
             be filtered out and only the non-empty (*n*, *bins*,
-            *patches*) will be returned.
+            *patches*) will be returned.  If *histtype* is 'step' or
+            'stepfilled', this can also be a float>0 specifying the 
+            minimum value for the bins (typically used to set the value 
+            for empty bins).
 
           *color*:
             Color spec or sequence of color specs, one per
@@ -7720,9 +7726,14 @@
             y = np.zeros( 2*len(bins), np.float )
 
             x[0::2], x[1::2] = bins, bins
+            
+            if log is True:
+                minimum = 1.0
+            elif log:
+                minimum = float(log)
+            else:
+                minimum = 0.0
 
-            minimum = min(bins)
-
             if align == 'left' or align == 'center':
                 x -= 0.5*(bins[1]-bins[0])
             elif align == 'right':
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to