[Matplotlib-users] How to do accumulation plots with matplotlib

2009-09-05 Thread nbv4
Hi, I am a new user to matplotlib. I have a huge list of values that look like this: [1,0,0,0,2,3,2,1,0,0,0,2,2,1,3,0,0,3...] each point basically represents the derivative of the line at that point, if that makes any sense. I want to take this data and display it in a linegraph as if it were

Re: [Matplotlib-users] How to do accumulation plots with matplotlib

2009-09-05 Thread Jouni K . Seppänen
nbv4 cp368...@ohiou.edu writes: [1,0,0,0,2,3,2,1,0,0,0,2,2,1,3,0,0,3...] [...] I want to take this data and display it in a linegraph as if it were this data: [1,1,1,1,3,5,7,8,8,8,10,12,13,16,16,16,19,...] You can use numpy.cumsum to transform your data. For example, in ipython -pylab: In

Re: [Matplotlib-users] How to do accumulation plots with matplotlib

2009-09-05 Thread nbv4
Jouni K. Seppänen wrote: nbv4 cp368...@ohiou.edu writes: [1,0,0,0,2,3,2,1,0,0,0,2,2,1,3,0,0,3...] [...] I want to take this data and display it in a linegraph as if it were this data: [1,1,1,1,3,5,7,8,8,8,10,12,13,16,16,16,19,...] You can use numpy.cumsum to transform your data.