[英]Matplotlib : cannot turn off interactive mode in spyder
使用此代码:
import matplotlib.pyplot as plt
plt.ioff()
plt.plot([1.6, 2.7])
plt.show()
show()
调用应该阻塞,直到我关闭图形。 但事实并非如此, show()
不会阻止执行。 当我的图形仍然显示时,我可以向IPython shell添加一些代码。
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 6.5.0 -- An enhanced Interactive Python.
我的后端是“ Qt5Agg”
我在另一个python env(来自Cygwin)上测试了此代码:它完美无缺。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.