Not sure if this will help, but maybe you can do something like this?
---
#!/usr/bin/env python
from pylab import *
from scipy import *
img = standard_normal((40,40))
image = imshow(img,interpolation='nearest',animated=True,label="blah")
for k in range(1,10000):
img = standard_normal((40,40))
image.set_data(img)
show()
---
Note, interpolation='nearest' can be faster than interpolation=None if
your default interpolation is set to bicubic (which it probably is)
Does this speed things up?
Thomas
On May 1, 2009, at 3:31 PM, Joey Wilson wrote:
> I am creating a script that generates images and displays them to
> the screen in real time. I created the following simple script:
>
> __________________________
>
> #!/usr/bin/env python
>
> from pylab import *
> from scipy import *
>
> for k in range(1,10000):
> img = standard_normal((40,40))
> imshow(img,interpolation=None,animated=True,label="blah")
> clf()
> show()
>
> __________________________
>
> Now, this script plots the image too slowly. I am forced to use
> the clf() function so that it doesn't slow down at each iteration of
> the for loop. Is there a way that I can plot this simple image
> faster? What's the best way to get imshow() to plot quickly?
> Thanks for your help.
>
> -Joey
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code
> vel09scf
> and Save an extra 15% before 5/3.
> http://p.sf.net/sfu/velocityconf_______________________________________________
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users