rate of change for a splice of data

I have a large array that looks like this:

vals=[0,0,1,3,2,1,0,4,2,4,2...]
dates = [datetime.date(...), datetime.date(...)...]

which then is transformed into a cumsum:

acc_vals = np.cumsum(vals)

and then that is sent to maplotlib to be graphed. The resultant graph looks
like this:

http://img171.imageshack.us/img171/8589/linetotal.png

The blue line is the cumsum data, and the red line is the raw values (just
for illustrative purposes). What I want is the red line to represent the
rate of change for the previous month. That is to say at each point in the
graph, the value on the red line represents the total number of flight time
that has occurred over the previous 30 days. Is this something that
matplotlib can handles on it's own? Or am I going to have to write my own
number crunching method to get it working?

ยทยทยท

--
View this message in context: http://www.nabble.com/rate-of-change-for-a-splice-of-data-tp25376306p25376306.html
Sent from the matplotlib - users mailing list archive at Nabble.com.