From: <mme...@us...> - 2008-05-16 17:48:10
|
Revision: 5149 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5149&view=rev Author: mmetz_bn Date: 2008-05-16 10:47:51 -0700 (Fri, 16 May 2008) Log Message: ----------- Added elinewidth keyword arg to errorbar bases on patch by Christopher Brown Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-05-16 17:06:53 UTC (rev 5148) +++ trunk/matplotlib/CHANGELOG 2008-05-16 17:47:51 UTC (rev 5149) @@ -1,6 +1,8 @@ +2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch + by Christopher Brown - MM + 2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative - histograms. For normed hists, this is normalized to one - assuming equally spaced bins - MM + histograms. For normed hists, this is normalized to one - MM 2008-05-15 Fix Tk backend segfault on some machines - MGD Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-16 17:06:53 UTC (rev 5148) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-16 17:47:51 UTC (rev 5149) @@ -3752,13 +3752,13 @@ def errorbar(self, x, y, yerr=None, xerr=None, - fmt='-', ecolor=None, capsize=3, + fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, **kwargs): """ ERRORBAR(x, y, yerr=None, xerr=None, - fmt='b-', ecolor=None, capsize=3, barsabove=False, - lolims=False, uplims=False, + fmt='b-', ecolor=None, elinewidth=None, capsize=3, + barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False) Plot x versus y with error deltas in yerr and xerr. @@ -3783,6 +3783,9 @@ ecolor is a matplotlib color arg which gives the color the errorbar lines; if None, use the marker color. + elinewidth is the linewidth of the errorbar lines; + if None, use the linewidth. + capsize is the size of the error bar caps in points barsabove, if True, will plot the errorbars above the plot symbols @@ -3842,10 +3845,13 @@ caplines = [] lines_kw = {'label':'_nolegend_'} - if 'linewidth' in kwargs: - lines_kw['linewidth']=kwargs['linewidth'] - if 'lw' in kwargs: - lines_kw['lw']=kwargs['lw'] + if elinewidth: + lines_kw['linewidth'] = elinewidth + else: + if 'linewidth' in kwargs: + lines_kw['linewidth']=kwargs['linewidth'] + if 'lw' in kwargs: + lines_kw['lw']=kwargs['lw'] if 'transform' in kwargs: lines_kw['transform'] = kwargs['transform'] @@ -5432,8 +5438,7 @@ If normed is true, the first element of the return tuple will be the counts normalized to form a probability density, ie, n/(len(x)*dbin). In a probability density, the integral of - the histogram should be one (we assume equally spaced bins); - you can verify that with + the histogram should be one; you can verify that with # trapezoidal integration of the probability density function pdf, bins, patches = ax.hist(...) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |