Hello,
is there any hope that the problems with animate will be fixed for Mac users ?
Christophe BAL
Hello,
is there any hope that the problems with animate will be fixed for Mac users ?
Christophe BAL
The only problem I'm aware of for Mac OSX is with blitting; blitting is
purely a performance optimization, so animations themselves should work
fine.
Is there something else I'm missing?
Ryan
On Thu, Mar 13, 2014 at 2:34 AM, Christophe Bal <projetmbc@...287...> wrote:
Hello,
is there any hope that the problems with animate will be fixed for Mac
users ?
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
The problems with animations on Mac
are not so much related to the backend,
but to the animations code itself. Animations
with the MacOSX backend cannot be fixed
without redesigning the animations module.
Best,
-Michiel.
--------------------------------------------
On Thu, 3/13/14, Ryan May <rmay31@...287...> wrote:
Subject: Re: [Matplotlib-users] Animate on Mac O$
To: "Christophe Bal" <projetmbc@...287...>
Cc: "Matplotlib" <matplotlib-users@lists.sourceforge.net>
Date: Thursday, March 13, 2014, 5:54 PM
On Thu, Mar 13, 2014 at 2:34 AM, Christophe Bal <projetmbc@...287...> wrote:
Hello,is there any hope that the problems
with animate will be fixed for Mac users
?
The only problem I'm aware of for Mac OSX is
with blitting; blitting is purely a performance
optimization, so animations themselves should work
fine.
Is there something else I'm missing?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph
databases and their
applications. Written by three acclaimed leaders in the
field,
this first edition is now available. Download your free book
today!
http://p.sf.net/sfu/13534_NeoTech
-----Inline Attachment Follows-----
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Can you give me a better idea why you think so? I wrote the original and have a Mac now...
Ryan
On Mar 13, 2014, at 17:55, Michiel de Hoon <mjldehoon@...9...> wrote:
The problems with animations on Mac
are not so much related to the backend,
but to the animations code itself. Animations
with the MacOSX backend cannot be fixed
without redesigning the animations module.
Hi Ryan,
In matplotlib, drawing is done as part of the call to figure.draw(renderer).
The MacOSX backend makes this call from the event loop callback
(i.e., the drawRect function in src/_macosx.m). Outside of the event loop
callback, the graphics context (CGContextRef on Macs) is undefined, and
no drawing can take place.
In the animations module, event_source is a timer that periodically calls
_step, which calls _draw_next_frame, which calls _post_draw to do the
blitting. But since the timer lives outside if the event loop, blitting will fail on
Macs; there simply is no graphics context to draw to.
The solution is to split the blitting into two parts:
- A front-end blitting function that tells matplotlib to blit
(this is the function called by the timer)
- A back-end blitting function that does the actual blitting
(as part of the call to figure.draw(renderer);
the back-end blitting function is implemented in the backend).
In a sense, this is the same as for the other graphics functions
(e.g. there is a front-end "plot" function, and a back-end "draw_path" function).
See the discussion here for more information:
https://github.com/matplotlib/matplotlib/issues/531
(this discussion also went into other issues though).
Best,
-Michiel.
--------------------------------------------
On Thu, 3/13/14, Ryan May <rmay31@...287...> wrote:
Subject: Re: [Matplotlib-users] Animate on Mac O$
To: "Michiel de Hoon" <mjldehoon@...9...>
Cc: "Christophe Bal" <projetmbc@...287...>, "Matplotlib" <matplotlib-users@lists.sourceforge.net>
Date: Thursday, March 13, 2014, 8:29 PM
> On Mar 13, 2014, at 17:55, Michiel de Hoon <mjldehoon@...9...> wrote:
>
> The problems with animations on Mac
> are not so much related to the backend,
> but to the animations code itself. Animations
> with the MacOSX backend cannot be fixed
> without redesigning the animations module.
Can you give me a better idea why you think so? I wrote the
original and have a Mac now...
Ryan