show() in pylab doesn't work if used twice
vvnrk.vanapalli at gmail.com
Wed Jul 6 18:05:48 EDT 2011
I have been using python for just over a month now.
I am writing a program to plot some graph using the show() twice in
the same program. The code snippet is shown below.
I am trying to plot a simple x vs y using ax.plot() then I get a
figure displayed. I close the figure displayed and then the execution
proceeds. Now If i try to call show second time with the updated
values of x and y, the second figure does not appear on my desktop.
but the second call to show() appears to work as the code also printed
'passed the second show' as well
Can someone help me figure out what the problem here is.why is the
second figure not coming up on the desktop.
I am using python 2.7 .
from pylab import *
import pylab as pl
import matplotlib.pyplot as plt
print 'passed the first show()'
print 'passed the second show()'
More information about the Python-list