On Thu, 2008-10-09 at 03:15 +0000, [EMAIL PROTECTED] wrote: > Message: 8 > Date: Wed, 08 Oct 2008 17:05:46 -0400 > From: Alan G Isaac <[EMAIL PROTECTED]> > Subject: Re: [Matplotlib-users] Animation and imshow > To: Matplotlib Users <matplotlib-users@lists.sourceforge.net> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8; format=flowed > > On 10/7/2008 6:23 PM Michael apparently wrote: > > loop through the data and call clf(): > if the confusion is over my signature, i still sign using a gpg key registered to a different email account > The clf call seems quite wrong: > it flashes horribly and I get good > behavior without it (once I add > a call to sleep). What am I > missing?
afaik it doesn't look like there's anything missing if anything there is some superfluous code: fig1 = plt.figure(1) ax1 = fig1.gca() and the animated=True kwarg I don't what is optimum, matplotlib has always been a bit hackish for animation i think best Michael Nandris > > > Alan Isaac > > PS The following almost works (i.e., works, > but then exits with an error). > > import matplotlib.pyplot as plt > from time import sleep > from numpy import zeros > > plt.ion() > plt.hold(False) > > data = list() > slices = list() > for i in range(5): > frame = zeros( (200,200) ) > frame[20:40,10*i:10*i+20] = 255 > data.append(frame) > > fig1 = plt.figure(1) > ax1 = fig1.gca() > for frame in data: > plt.imshow(frame, axes=ax1, animated=True) > sleep(0.2) -- "When you think of the long and gloomy history of man, you will find far more hideous crimes have been committed in the name of obedience than have been committed in the name of rebellion". C.P.Snow, "Either-Or" (1961)
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- 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=100&url=/
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users