From: Wayne W. <sie...@sb...> - 2010-02-07 21:50:46
|
Note the show() on the last line below. If I run this program from IDLE, it displays the graph, and sits there. I would like to finish, by getting to an active shell script. If I close the figure using x in the upper right, it disappears. Now two windows are seen. The code and script window. The script window is not active. I can't enter anything into it. The cursor is below the >>>. Ctrl-C doesn't work. If I use the x in the upper corner, eventually the script window disappears. How do I just return to the script? There ought to be a smooth way to do this by putting something after show(). import matplotlib matplotlib.use('Agg') from pylab import figure, show import numpy as np # make an agg figure fig = figure() ax = fig.add_subplot(111) ax.plot([1,2,3]) ax.set_title('a simple figure') fig.canvas.draw() show() -- My life in two words. "Interrupted Projects." -- WTW (quote originator) |