3 回答
TA贡献1777条经验 获得超3个赞
Figure
吡咯烷酮界面
pyplot
pyplot
import matplotlib.pyplot as plt
plt.cla()
plt.clf()
plt.close()
close()
figure(number_or_name)
fig
fig = figure()
close()
close('all')
图类的方法
Figure
fig
Figure
:
fig.clf()
plt.clf()
fig
fig.clear()
fig.clf()
del fig
plt.close(fig)
TA贡献1848条经验 获得超10个赞
plt.close(fig)
fig.clf()
for i in range(5): fig = plot_figure() plt.close(fig)# This returns a list with all figure numbers availableprint(plt.get_fignums())
for i in range(5): fig = plot_figure() fig.clf()# This returns a list with all figure numbers availableprint(plt.get_fignums())
import numpy as npimport matplotlib.pyplot as plt x = np.arange(1000)y = np.sin(x)for i in range(5): fig = plt.figure() ax = fig.add_subplot(1, 1, 1) ax.plot(x, y) plt.close(fig)print(plt.get_fignums())for i in range(5): fig = plt.figure() ax = fig.add_subplot(1, 1, 1) ax.plot(x, y) fig.clf()print(plt.get_fignums())
TA贡献1853条经验 获得超6个赞
plt.cla()
plt.clf()
- 3 回答
- 0 关注
- 3148 浏览
添加回答
举报