[Matplotlib] Ploting an exponential distribution frequency curve
Mario Figueiredo
marfig at gmail.com
Sun Apr 26 08:32:06 EDT 2015
On Sun, 26 Apr 2015 11:17:07 +0100, Dave Farrance
<DaveFarrance at OMiTTHiSyahooANDTHiS.co.uk> wrote:
>
>Moving average. Try:
>
>def movingaverage(interval, window_size):
> window= numpy.ones(int(window_size))/float(window_size)
> return numpy.convolve(interval, window, 'same')
>
>y_av = movingaverage(y,10)
>
>Note that you'd get problems at the start and end of the curve if it's
>non-zero there, which is difficult to avoid with noise-reduction.
Thanks for the suggestion, Dave.
I'm also considering the interpolation sub-package in SciPy.
http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html
I was a bit surprised that matplotlib didn't offer me interpolation
out-of-the-box like gnuplot's `smooth csplines` option.
More information about the Python-list
mailing list