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. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users