Re: [Matplotlib-users] Events

2012-01-29 Thread Fernando Perez
On Sun, Jan 29, 2012 at 2:29 PM, Jerzy Karczmarczuk wrote: > This is a temporal pause, not an undetermined suspension, restartable. Ah, never mind then. I didn't read the docstring and misunderstood the discussion in the pull request. Cheers, f

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
Fernando Perez: > I now see there's even a pause() call: > > https://github.com/matplotlib/matplotlib/pull/148 > > so it seems like it should be an easy matter of adding the button and > wire it to pause(). This is a temporal pause, not an undetermined suspension, restartable. Jerzy

Re: [Matplotlib-users] Events

2012-01-29 Thread Fernando Perez
On Sun, Jan 29, 2012 at 12:20 PM, Jerzy Karczmarczuk wrote: > This happens also with different backends and the driving interface (say, > Idle with Tkinter...) > Some solutions exist. The simplest one is the following. Thanks for the tips! It would really be nice if in animation mode, the mpl w

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
Fernando Perez : The lack of a clean pause/restart functionality is indeed problematic. Furthermore, closing a window that's running an animation, at least with the Qt backend, gave rise to a massive swarm of 'C++ object has been deleted' messages flooding the console where my ipython kernel had

Re: [Matplotlib-users] Events

2012-01-29 Thread Fernando Perez
On Sun, Jan 29, 2012 at 3:41 AM, Jerzy Karczmarczuk wrote: > > > There is one "rant", if you wish (of course, I am joking). > > The animation objects (FuncAnimation, etc.) are coded as they are, > probably sufficient for you. They are "one shot". But if you want to > stop and to resume your animat

Re: [Matplotlib-users] Events

2012-01-29 Thread Benjamin Root
On Sunday, January 29, 2012, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > I believe that I should terminate this thread (from my side), since the image is clear. The actual version of Matplotlib is not adapted to my needs, a rather involved animation of many objects, and changing. T

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
I believe that I should terminate this thread (from my side), since the image is clear. The actual version of Matplotlib is not adapted to my needs, a rather involved animation of many objects, and changing. The last dialogue with Benjamin Root, whom I am deeply grateful, cleared my doubts. Ben

Re: [Matplotlib-users] Events

2012-01-28 Thread Benjamin Root
On Sat, Jan 28, 2012 at 4:10 PM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Ben Root, about my example in which an infinite callback loop overflows : > > So, where is your terminating condition? Of course it will continuously > call itself if you have nothing to stop it. Prote

Re: [Matplotlib-users] Events

2012-01-28 Thread Benjamin Root
On Sat, Jan 28, 2012 at 10:31 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root about my miserable event problem : > > Still not sure why my suggestion would not work: > > > http://matplotlib.sourceforge.net/api/cbook_api.html#matplotlib.cbook.CallbackRegistry > > > I

Re: [Matplotlib-users] Events

2012-01-28 Thread Jerzy Karczmarczuk
Benjamin Root about my miserable event problem : Still not sure why my suggestion would not work: http://matplotlib.sourceforge.net/api/cbook_api.html#matplotlib.cbook.CallbackRegistry I thought I told you. Probably I am doing something utterly false, but my distilled problem is that*I am gen

Re: [Matplotlib-users] Events

2012-01-27 Thread Benjamin Root
On Fri, Jan 27, 2012 at 4:54 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root answers my query concerning user-generated events : > > To answer your question, take a look at how pick_event() is declared > > in backend_bases.py: > > > > def pick_event(self, mouseev

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Tony Yu suggests that my multiple and changing animation problems could be solved using coroutining. > have you looked into using a coroutine. /... /I've attached a simple > example below. > > import matplotlib.pyplot as plt > import numpy as np > def datalistener(): > ... > while True: >

Re: [Matplotlib-users] Events

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 5:54 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root answers my query concerning user-generated events : > > To answer your question, take a look at how pick_event() is declared > > in backend_bases.py: > > > > def pick_event(self, mouseev

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Benjamin Root answers my query concerning user-generated events : > To answer your question, take a look at how pick_event() is declared > in backend_bases.py: > > def pick_event(self, mouseevent, artist, **kwargs): > ... > self.callbacks.process(s, event) > > The function that "f

Re: [Matplotlib-users] Events

2012-01-26 Thread Benjamin Root
On Thu, Jan 26, 2012 at 3:24 PM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Does anybody know how to generate and process my "private" events? I can > subclass the Event() class, say, MyEvent, > with a name "my_event", and I can - >canvas.mpl_connect('my_event', aCallback) >

[Matplotlib-users] Events

2012-01-26 Thread Jerzy Karczmarczuk
Does anybody know how to generate and process my "private" events? I can subclass the Event() class, say, MyEvent, with a name "my_event", and I can - canvas.mpl_connect('my_event', aCallback) but then, how to fire one? (I don't want to call the callback directly). Suppose that the interfac

Re: [Matplotlib-users] Events not registering in FigureCanvasWxAgg

2010-10-07 Thread Eric Firing
On 10/07/2010 07:11 PM, Åke Kullenberg wrote: > I am using Python 2.7 and Matplotlib 1.0.0 and I am having problems > getting events triggering in this example below. I have taken the > draggable rectangle example (with blit) code from the event handling > documentation > (http://matplotlib.sourcef

[Matplotlib-users] Events not registering in FigureCanvasWxAgg

2010-10-07 Thread Åke Kullenberg
I am using Python 2.7 and Matplotlib 1.0.0 and I am having problems getting events triggering in this example below. I have taken the draggable rectangle example (with blit) code from the event handling documentation ( http://matplotlib.sourceforge.net/users/event_handling.html) and tried to put it