【发布时间】:2011-10-18 12:29:56
【问题描述】:
我想绘制数据,然后创建一个新的图形并绘制数据2,最后回到原来的绘图并绘制数据3,有点像这样:
import numpy as np
import matplotlib as plt
x = arange(5)
y = np.exp(5)
plt.figure()
plt.plot(x, y)
z = np.sin(x)
plt.figure()
plt.plot(x, z)
w = np.cos(x)
plt.figure("""first figure""") # Here's the part I need
plt.plot(x, w)
仅供参考How do I tell matplotlib that I am done with a plot? 做了类似的事情,但不完全是!它不允许我访问那个原始情节。
【问题讨论】:
标签: python matplotlib plot figure