Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-23 Thread Simone Gabbriellini
that's nice!!! thank you... anyway, I wanted to take advantage of the Traits implementation of my app... simone 2009/1/23 eliben : > > > > Simone Gabbriellini-3 wrote: >> >> Dear List, >> >> I have some variables I want to plot... the values of those variable >> change in time... I would like to

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-23 Thread eliben
Simone Gabbriellini-3 wrote: > > Dear List, > > I have some variables I want to plot... the values of those variable > change in time... I would like to plot the result with a traditional > line plot > > those variables are traits of a class (don't know if this can make a > difference...) >

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-20 Thread Simone Gabbriellini
Sorry I made a mistake... what I mean is that I tryed the code in the section "GUI neutral animation in pylab" from http://www.scipy.org/Cookbook/Matplotlib/Animations, which is my case... and, as I said, nothing is drawn in the window untill the function ends the cycle, then the line is displayed

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-20 Thread Simone Gabbriellini
Ryan, > You'd want to look at the animation examples in examples/animation. The exact > details will depend upon what backend you want to use, but > strip_chart_demo.py, > simple_anim_gtk.py, and gtk_timeout.py are good places to start. I tried the strip_chart_demo.py, which is my case, but at

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-19 Thread Ryan May
Simone Gabbriellini wrote: > I see that you first build your array and then display it at the end... > > is it possible in matplotlib to update the plot while the class is > evolving? like: > > f.evolve(6) > f.display() > f.evolve(.27) > f.display() > f.evolve(10) > f.display() > f.evolve(2) > f.

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-19 Thread Simone Gabbriellini
I see that you first build your array and then display it at the end... is it possible in matplotlib to update the plot while the class is evolving? like: f.evolve(6) f.display() f.evolve(.27) f.display() f.evolve(10) f.display() f.evolve(2) f.display() best regards, simone 2009/1/19 C Lewis :

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-18 Thread C Lewis
#Skeleton example of a taking snapshots of an evolving class import pylab as p from math import log class foo: def __init__(self): self.red = 0 self.green = 1 self.age = 0 self.history = ([self.age],[self.red],[self.green]) def snapshot(self):

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-18 Thread Simone Gabbriellini
thanks, it is exactly what I need... I have undestood the logic, I build a plot, put my traits values into an array and then I call the add_current_state_to_plot function to update the plot with the new values... I am an absolute beginner of matplotlib, can you give me a little example of add_cur

Re: [Matplotlib-users] plot a data stream with matplotlib

2009-01-18 Thread C Lewis
Guessing about what you want: Does the class change with time? that is, perhaps you have a class foo, and foo evolves, and you would like to plot a history of some traits of foo, but at any given moment foo only contains its current state? If so, I think you need to have a function in foo,