简体   繁体   English

Spyder 绘图块控制台命令

[英]Spyder plotting blocks console commands

Whenever I execute a plt.show() in an Ipython console in spyderlib, the console freezes until I close the figure window. This only occurs in spyderlib and the blocking does occur when I run ipython --pylab or run ipython normally and call plt.ion() before plotting.每当我在 spyderlib 的 Ipython 控制台中执行plt.show()时,控制台都会冻结,直到我关闭图 window。这只发生在 spyderlib 中,当我运行ipython --pylab或正常运行 ipython 并调用plt.ion()时,确实会发生阻塞plt.ion()在绘图之前。 I've tried using plt.draw() , but nothing happens with that command.我试过使用plt.draw() ,但该命令没有任何反应。

plt.ion() works for ipython, but when I run the same command in spyder it seems to not plot anything altogether ( plt.show() no longer works). plt.ion()适用于 ipython,但是当我在 spyder 中运行相同的命令时,它似乎完全不是 plot 任何东西( plt.show()不再有效)。

Enviroment Details: Python 2.6.5, Qt 4.6.2, PyQt4 (API v2) 4.7.2 on Linux环境详细信息:Python 2.6.5、Qt 4.6.2、PyQt4 (API v2) 4.7.2 on Linux

I was having a similar (I think) problem.我有一个类似的(我认为)问题。 Make sure your interpreter is set to execute in the current interpreter (default, should allow for interactive plotting).确保您的解释器设置为在当前解释器中执行(默认情况下,应该允许交互式绘图)。 If it's set to execute in a new dedicated python interpreter make sure that interact with the python interpreter after execution is selected.如果它设置为在新的专用 python 解释器中执行,请确保在选择执行后与 python 解释器进行交互 This solved the problem for me.这为我解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM