8 Oct 00:23
Re: Animation and imshow
From: Michael <mnandris@...>
Subject: Re: Animation and imshow
Newsgroups: gmane.comp.python.matplotlib.general
Date: 2008-10-07 22:23:57 GMT
Subject: Re: Animation and imshow
Newsgroups: gmane.comp.python.matplotlib.general
Date: 2008-10-07 22:23:57 GMT
loop through the data and call clf():
from pylab import *
from numpy import *
ion()
hold(False)
frame1 = zeros((200, 200))
frame1[20:40, 20:40] = 255
frame2 = zeros((200, 200))
frame2[20:40, 30:50] = 255
frame3 = zeros((200, 200))
frame3[20:40, 40:60] = 255
frame4 = zeros((200, 200))
frame4[20:40, 50:70] = 255
frame5 = zeros((200, 200))
frame5[20:40, 50:70] = 255
data=[frame1,frame2,frame3,frame4,frame5]
for frame in data:
m=imshow(frame)
m.set_data(frame)
clf()
show()
(Continue reading)
RSS Feed