[Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread Tony S Yu
The GUI neutral animation example from the SciPy cookbook doesn't seem  
to work for Wx or WxAgg backends. A plot window opens but nothing  
happens. It appears to be some weird problem with ion on wx.

For example, the following code will run and immediately close:
  plt.ion()
  plt.plot(x, y)
  plt.show()
After removing plt.ion(), a plot window is opened and the program  
doesn't end until the window is closed (as expected).

If I use TkAgg or Qt4Agg (the only other GUI backends I have  
installed) the examples (above and below) work as expected.

-Tony

Full Example:
#
import matplotlib
matplotlib.use('WxAgg')
import matplotlib.pyplot as plt
import numpy as np

plt.ion()
x = np.arange(0, 2*np.pi, 0.01)
line, = plt.plot(x, np.sin(x))
for i in np.arange(1, 20):
 line.set_ydata(np.sin(x + i/10.0))
 plt.draw()
#

PS. This seems to work the same on both trunk and 0.98.3.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread John Hunter
On Thu, Oct 23, 2008 at 10:30 AM, Tony S Yu [EMAIL PROTECTED] wrote:
 The GUI neutral animation example from the SciPy cookbook doesn't seem
 to work for Wx or WxAgg backends. A plot window opens but nothing
 happens. It appears to be some weird problem with ion on wx.


GUI neutral animation is not supported or recommended.  I need to
update the cookbook, but if you want to do it that would be great as I
am short on time until next week.  The examples in examples/animation
are the recommended way:

  http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

I have spent some time working on abstracting the necessary parts, eg
the idle handler, but have not completed this across interfaces.

JDH

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] GUI neutral animation example doesn't work with WxAgg/Wx

2008-10-23 Thread Tony S Yu

On Oct 23, 2008, at 12:00 PM, John Hunter wrote:

 On Thu, Oct 23, 2008 at 10:30 AM, Tony S Yu [EMAIL PROTECTED] wrote:
 The GUI neutral animation example from the SciPy cookbook doesn't  
 seem
 to work for Wx or WxAgg backends. A plot window opens but nothing
 happens. It appears to be some weird problem with ion on wx.


 GUI neutral animation is not supported or recommended.  I need to
 update the cookbook, but if you want to do it that would be great as I
 am short on time until next week.

I'd be happy to help, but I'm not sure what had you in mind. Sorry I'm  
still a student---I need guidance. ;)

-Tony

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users