Python Spyder 选择何时何地显示绘图 [英] Python Spyder choose where and when to show plots
问题描述
我在 Windows 10 中使用带有 Python 3.5 的 Spyder3.1.2 IDE,想知道如何选择是在 iPython 控制台中还是在单独的窗口中显示我的绘图.我发现了这个
由于此python控制台不是IPython控制台,因此无需执行任何其他设置.该图应显示在 plt.show()
上的窗口中.
I'm using Spyder3.1.2 IDE with Python 3.5 in Windows 10 and would like to know how to choose whether to show my plots in the iPython console or in a separate window. I found this other question but I get an error when I type %matplotlib qt
(No module named PyQt4). I have also changed the preferences to show graphics "automatically" instead of "inline", but I'm still getting them inline.
What I want to end up with is a for
loop where on every iteration I add a new point to my graph, which is visible immediately and is shown in a separate window to the console.
Many thanks for your time
You can run your script in a new python console every time you run it.
For that press F6 or go to Run/Configure... and select "Execute in a new dedicated Python console.
Since this python console will not be an IPython console, there is no need to perform any other settings.
The plot should show up in a window upon plt.show()
.
这篇关于Python Spyder 选择何时何地显示绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!