On 06/24/2011 04:03 AM, Jonathan Slavin wrote:
> import matplotlib.pyplot as plt
> plt.ion()
> fig = plt.gcf()
> for obsid in obsids:
> <do fitting>
> plt.cla()
> fig = plt.gcf()
> ax = fig.add_axes([0.15,0.1,0.8,0.6])
> ax.plot(x,y)
> plt.draw()
> ans = raw_input('continue? ')
> if ans == 'n':
> break
The behavior may depend on mpl version and backend, but with 1.0.1 or
later, I think something like what you have will work with a little
cleanup, e.g.:
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
fig = plt.gcf()
ax = fig.add_axes([0.15,0.1,0.8,0.6])
for i in range(3):
ax.cla()
ax.plot(np.random.rand(10))
plt.draw()
raw_input("hit a key to proceed")
Eric
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense..
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users