在python3命令行会话中,一旦启动了plt.show()。我不能再键入任何python3命令。有没有办法让plt.show()成为非阻塞的?
$ python3
Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> x = [1, 2, 3]
>>> y = [3, 2, 1]
>>> plt.scatter(x,y)
<matplotlib.collections.PathCollection object at 0x7feb00256670>
>>> plt.show()发布于 2021-06-16 06:11:12
在plt.show()之前使用plt.ion()启用交互模式。
https://stackoverflow.com/questions/67993522
复制相似问题