Re: [Matplotlib-users] Adding points gradually to the plot

2010-01-14 Thread Matthias Michler
Hello, I think you could do the following On Wednesday 13 January 2010 19:14:08 Someday... wrote: > Hello all, > > I am looking for a way to add points gradually to the plot over time. > Currently, in every iteration, I plot the entire array, like: > plt.ion() # turn on interactive mode (otherwi

Re: [Matplotlib-users] Adding points gradually to the plot

2010-01-13 Thread Jonathan Slavin
Instead of appending the points to xs and ys and doing plot(xs,ys) each time, why not just do plot(x,y)? If you want to save the data in the xs, ys arrays you can do that without replotting the entire array. Jon On Wed, 2010-01-13 at 10:14 -0800, Someday... wrote: > Hello all, > > I am looking f

[Matplotlib-users] Adding points gradually to the plot

2010-01-13 Thread Someday...
Hello all, I am looking for a way to add points gradually to the plot over time. Currently, in every iteration, I plot the entire array, like: fig = plt.figure(); ax = fig.gca() xs = array([]) ys = array([]) while not done: // do some calculation.. // x=???, y=??? xs = append(xs,x); ys =