Hi Mike, Ryan, Thanks for your comments. I have made a pull request; see: https://github.com/matplotlib/matplotlib/pull/1907
Best, -Michiel --- On Mon, 4/15/13, Michael Droettboom <md...@stsci.edu> wrote: > From: Michael Droettboom <md...@stsci.edu> > Subject: Re: [matplotlib-devel] Timers independent of canvases > To: matplotlib-devel@lists.sourceforge.net > Date: Monday, April 15, 2013, 10:56 AM > Thanks for doing this. This > looks like quite an improvement! > > Why don't you go ahead and make a pull request. I > think on the whole > the idea is sound, I just have a few minor comments that can > probably be > dealt with more efficiently in a PR. > > Mike > > On 04/12/2013 10:32 PM, Michiel de Hoon wrote: > > Dear all, > > > > The animation code in matplotlib relies on timers to > update the animated figures. Currently a new timer is > created by calling new_timer on a canvas, as in > > > >>>> f = pylab.figure() > >>>> timer = f.canvas.new_timer() > > This seems a bit of a wrinkle. For example, you may > want to associate a timer with multiple figures, or with no > figure at all; also you may want to continue using a timer > after a particular figure is closed. > > > > I would therefore propose to make timers independent of > canvases. Something like this: > > > >>>> from matplotlib import events > >>>> timer = events.Timer() > > This has the additional advantage of making the > different backends more similar to each other; in the > current implementation some backends rely on the canvas when > making a timer, while others ignore it. > > > > I have made a branch on github that does exactly this; > see > > https://github.com/mdehoon/matplotlib/tree/Timer > > I have verified that the animation examples still work > correctly with all backends. > > > > Any comments/suggestions/criticisms? If this seems a > good idea, I can make a pull request. > > > > Best, > > -Michiel. > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable > of advanced > > analytics on semi-structured data. The platform > includes APIs for building > > apps and a phenomenal toolset for data science. > Developers can use > > our toolset for easy data analysis & visualization. > Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Matplotlib-devel mailing list > > Matplotlib-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of > advanced > analytics on semi-structured data. The platform includes > APIs for building > apps and a phenomenal toolset for data science. Developers > can use > our toolset for easy data analysis & visualization. Get > a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel