Python Spyder choose where and when to show plots

筅森魡賤 提交于 2019-12-02 17:35:29

问题


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


回答1:


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().



来源:https://stackoverflow.com/questions/42655533/python-spyder-choose-where-and-when-to-show-plots

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!