|
From: Ryan M. <rm...@gm...> - 2009-02-24 16:32:02
|
On Mon, Feb 23, 2009 at 9:33 PM, lehe <tim...@ya...> 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.
|