|
From: zxc <Web...@we...> - 2010-02-07 18:06:29
|
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() |