Matplotlib: Plot Window schließen - wie geht das?
Verfasst: Sonntag 7. Februar 2010, 22:43
Hallo zusammen!
Weiß jemand, wie man ein plot-Fenster in matplotlib schließt? Ich bin hier schon richtig am verzweifeln.
Toll wäre natürlich, wenn mir das jemand an unterem Beispiel erklären könnte:
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()
Weiß jemand, wie man ein plot-Fenster in matplotlib schließt? Ich bin hier schon richtig am verzweifeln.
Toll wäre natürlich, wenn mir das jemand an unterem Beispiel erklären könnte:
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()