To all:

I'm doing a series of fits and want to display the results of each in a
figure before I go to the next one.  I currently do roughly something
like this (with a lot left out):

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

This works, sort of, except that the first plot is not shown until the
second time I hit the raw_input line.  So my question is, is there any
way to make the figure display immediately when the draw() is executed?

Jon
-- 
______________________________________________________________
Jonathan D. Slavin              Harvard-Smithsonian CfA
jsla...@cfa.harvard.edu         60 Garden Street, MS 83
phone: (617) 496-7981           Cambridge, MA 02138-1516
 cell: (781) 363-0035           USA
______________________________________________________________


------------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to