From: <mme...@us...> - 2008-06-02 12:56:46
|
Revision: 5354 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5354&view=rev Author: mmetz_bn Date: 2008-06-02 05:55:57 -0700 (Mon, 02 Jun 2008) Log Message: ----------- fixed a bug for log-scale stacked histograms Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-06-02 11:48:42 UTC (rev 5353) +++ trunk/matplotlib/CHANGELOG 2008-06-02 12:55:57 UTC (rev 5354) @@ -1,4 +1,5 @@ -2008-06-02 Added support for log to hist with histtype='step' - MM +2008-06-02 Added support for log to hist with histtype='step' and fixed + a bug for log-scale stacked histograms - MM =============================================================== 2008-05-29 Released 0.98.0 at revision 5314 Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-02 11:48:42 UTC (rev 5353) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-02 12:55:57 UTC (rev 5354) @@ -5637,7 +5637,7 @@ align: ['edge' | 'center' ] Controles how the histogram is plotted. - If 'edge, bars are centered between the bin edges. + If 'edge', bars are centered between the bin edges. If 'center', bars are centered on the left bin edges orientation: @@ -5718,7 +5718,6 @@ boffset, dw = 0.0, 0.0 stacked = True - if bottom is None: bottom = 0.0 else: raise ValueError, 'invalid histtype: %s' % histtype @@ -5734,7 +5733,9 @@ left=bottom, align='center', log=log, color=color) patches.append(patch) - if stacked: bottom += m + if stacked: + if bottom is None: bottom = 0.0 + bottom += m boffset += dw ccount += 1 elif orientation == 'vertical': @@ -5744,7 +5745,9 @@ bottom=bottom, align='center', log=log, color=color) patches.append(patch) - if stacked: bottom += m + if stacked: + if bottom is None: bottom = 0.0 + bottom += m boffset += dw ccount += 1 else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |