On Mon, Feb 23, 2009 at 9:33 PM, lehe <timlee...@yahoo.com> wrote:

>
> Hi,
> I am now plot two figures, The second one won't generate until I close the
> first one but the second one just flash and disappear very quickly. How can
> I keep both figures open until I close them myself?
> Thanks
>
> Here is my code:
>    import matplotlib.pyplot as plt
>
>   ......
>
>    plt.figure() # ROC
>    plt.plot(FPRs,TPRs)
>    plt.xlabel('FP rate')
>    plt.ylabel('TP rate')
>    plt.title('ROC')
>    plt.grid(True)
>    plt.show()
>
>    plt.figure() # histograms of scores for ESE and for decoys
>    (bins, n) = histOutline.histOutline(ESE_scores)
>    plt.plot(bins, n/sum(n), 'r-')
>    (bins, n) = histOutline.histOutline(decoy_scores)
>    plt.plot(bins, n/sum(n), 'b-')
>    plt.title('Histogram of Scores')
>    plt.legend(('ESE','decoy'))
>    plt.show()
>

Delete your first call to show().  You only should call show() once, *after*
you generate all of your figures.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to