闭幕表演与即时表演

时间:2018-07-09 11:19:05

标签: python python-3.x matplotlib inline figure

通常,我使用以下图形关闭模式来防止the error

%matplotlib inline

plt.figure()
// plot here what necessary
plt.show()
// figure is displayed inline
plt.close()

在{strong> for 循环中,用show替换imshow,仅显示最后一个数字。

如何用imshow内联绘制内联线,以确保正确地闭合数字?

1 个答案:

答案 0 :(得分:0)

基于comment

for x in y:
    plt.figure()
    plt.imshow(...)
    plt.show()
    plt.close()