[Matplotlib-users] How to close a plot?
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. Thanks! John import matplotlib.pyplot as plt import time fig = plt.figure(1) ax = fig.add_subplot(111) ax.plot((1, 3, 1)) plt.show() time.sleep(10) plt.close(1) fig = plt.figure(2) ax = fig.add_subplot(111) ax.plot((4, 1, 0)) plt.show() -- 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
[Matplotlib-users] Maximize plotwindow & hot to plot figure by figure?
2 Problems: 1. How is it possible to maximize the window of the plot? 2. First I want to plot only figure 0, after 5 seconds figure 0 has to be closed and figure 1 to be shown. Any suggestions? from pylab import * import time ion() figure(0) plot([1,2,3]) figure(1) plot([10, 20, 30]) figure(0) plot([4, 5, 6]) figure(1) plot([40, 50, 60]) draw(0) time.sleep(5) close() draw(1) show() -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users