Re: [Matplotlib-users] animations in macosx/wxagg

2011-07-02 Thread Michiel de Hoon
Dear Chris,

 - can the native macos backend be used for animation?

Yes.

 What's the
 equivalent of gobject.idle_add or gobject.timeout_add?

If you use the recent backend-independent animation code, you won't need those. 
See examples/animation/simple_anim.py on github for an example (this code is 
not yet in an official release). However, blitting won't work, so you'll need 
to switch that off.

 Anything special needed for the blitting approach to work?

Currently it won't work with the MacOSX backend. For blitting to work with the 
MacOSX backend, we won't just need changes to the backend code (which is 
relatively straightforward) but also to the upstream 
lib/matplotlib/animation.py code. We will need to rethink the logic of blitting 
with animation, in particular when to store the figure to be blitted, and when 
to do the actual blitting. In the current version of 
lib/matplotlib/animation.py, the figure to be blitted gets stored after the 
figure is modified but before the screen is updated. With the other backends, 
this results in the unmodified figure being stored; with the MacOSX backend, 
this results in the modified figure being stored, so if you then blit it you 
will see an incorrect background.

--Michiel.


 
 - What needs to be done to get WXAgg blitting? I have code
 like this:
 ...
 matplotlib.use('WXAgg')
 ...
 def update():
     ...
     # restore, blit etc
     wx.WakeUpIdle()
 
 ...
 wx.EVT_IDLE(wx.GetApp(), update)
 ...
 
 On Linux this draws the first screen and pauses. If I move
 the mouse
 around I see the updates. As soon as I stop, so do the
 updates. What
 am I missing? (BTW I get the same behaviour from
 animation_blit_wx.py
 from the examples page). This is 1.0.1 on Linux, although
 I'm still
 using 0.99.1 as well.
 
 thanks for any help,
 
 cheers, chris
 
 
 
 
 
 -- 
 Chris Higgins, Omnisense Ltd, 3rd Floor, St. Andrews
 House,
 59 St Andrews Street, Cambridge, CB2 3BZ
 Office: +44 (0) 1223 651394
 Mobile: +44 (0) 780 490 8562
 Skype: chiggins99
 http://www.omnisense.co.uk
 
 Omnisense Ltd is a company registered in England and Wales.
 Registered number: 6779286.
 Registered office: St. Andrews House, 59 St Andrews Street,
 Cambridge, CB2 3BZ
 
 --
 All of the data generated in your IT infrastructure is
 seriously valuable.
 Why? It contains a definitive record of application
 performance, security 
 threats, fraudulent activity, and more. Splunk takes this
 data and makes 
 sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-d2d-c2
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] animations in macosx/wxagg

2011-06-30 Thread Chris Higgins
Hi,

I want to visualise a live data-stream by a number of plots (3d,
line drawings, scatter plots etc). I've been using the simpler
animation techniques (using gobject.idle_add and wx.EVT_IDLE to
redraw updates).

Some plots have static backgrounds that may benefit from the blit
techniques and I have been trying to get this approach to work in
GTKAgg and WXAgg. GTKAgg on linux seems to be coming along fine.
WXAgg on linux or macos, I'm not getting very far with.

So can anyone help with a few questions?

- can the native macos backend be used for animation? What's the
equivalent of gobject.idle_add or gobject.timeout_add? Anything
special needed for the blitting approach to work?

- What needs to be done to get WXAgg blitting? I have code like this:
...
matplotlib.use('WXAgg')
...
def update():
...
# restore, blit etc
wx.WakeUpIdle()

...
wx.EVT_IDLE(wx.GetApp(), update)
...

On Linux this draws the first screen and pauses. If I move the mouse
around I see the updates. As soon as I stop, so do the updates. What
am I missing? (BTW I get the same behaviour from animation_blit_wx.py
from the examples page). This is 1.0.1 on Linux, although I'm still
using 0.99.1 as well.

thanks for any help,

cheers, chris





-- 
Chris Higgins, Omnisense Ltd, 3rd Floor, St. Andrews House,
59 St Andrews Street, Cambridge, CB2 3BZ
Office: +44 (0) 1223 651394
Mobile: +44 (0) 780 490 8562
Skype: chiggins99
http://www.omnisense.co.uk

Omnisense Ltd is a company registered in England and Wales. Registered number: 
6779286.
Registered office: St. Andrews House, 59 St Andrews Street, Cambridge, CB2 3BZ

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users