|
From: David M. <mac...@ec...> - 2010-02-08 15:22:35
|
Jeff Whitaker wrote: > > zxc wrote: >> Hi there! >> I need to know how to close a figure/chart in matplot. >> >> Does anyone know how it works and could you please explain on the >> example below? >> The problem is: close(1) doesn't close the figure 1 and when the 2nd >> figure will be plot the program hangs. >> I tried with draw() but the figure doesn't appear. > > Use fig.close() > >>> fig.close() Traceback (most recent call last): - - - AttributeError: 'Figure' object has no attribute 'close' I think you mean plt.close(). This seems to suspend IDLE, and activate the plot and console windows. To get back, I use "exit" in the console window. Try using the draw() command instead of show(). Sometimes you need to issue this command twice. If I ever get this figured out, I'll write a HOWTO note. -- View this message in context: http://old.nabble.com/How-to-close-a-plot--tp27490895p27501480.html Sent from the matplotlib - users mailing list archive at Nabble.com. |