Hi thanks for the answer. I am not sure to undersand completely the question. I based my animation on the example anim.py using the ion() function. Is that idle event ?
I will have a look at the wx version an see if I undersand your advice. If ever you had code that you were willing to share I would be very thankfull. Already many thanks Bruno Greg Willden a écrit : > Hi Bruno, > > Which method are you using to do the animation? > Timer, Idle Event? > > If you are using a timer then it is pretty straightforward to start > and stop the timer from the handler for the button you added. > > I am using wxPython and I've hacked the animation_blit_wx.py example. > > You need functions like this: > timer = wx.Timer(panel,TIMER_ID) > wx.EVT_TIMER(panel,TIMER_ID, update_line) << Here you bind the timer > to your update function > > timer.Start(10) > timer.Stop() > > > Cheers, > Greg > > On 8/16/07, *bruno* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hello, > > I am probably reinventing the wheel. I am trying to get "rolling" > graph > a la labview with matplotlib. I have more or less managed to get > what I > want using the simple animation technique provided by matplotlib. I > would like now to have a button an the same graph that would enable me > to stop the program that is in an infinite acquisition loop. > > I have managed to use a matplotlib widget with the graph to make it > print something on a terminal, however I do not see how to make it > stop > an infinite loop. I have tried to make the button change the state > of a > variable and give the state of this variable a a stop condition to the > loop. However this doesn't work. In fact the button doesen't seems > to be > "listening" during the loop. > > Any idea of how I should be doing that ? > > Cordially > > Bruno > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > <mailto:Matplotlib-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > <https://lists.sourceforge.net/lists/listinfo/matplotlib-users> > > > > > -- > Linux. Because rebooting is for adding hardware. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users