【发布时间】:2012-03-17 21:29:48
【问题描述】:
我想让 matplotlib “show” 命令返回到命令行 在显示情节时。大多数其他绘图包,如 R,都这样做。 但是 pylab 挂起,直到绘图窗口关闭。例如:
import pylab
x = pylab.arange( 0, 10, 0.1)
y = pylab.sin(x)
pylab.plot(x,y, 'ro-')
pylab.show() # Python hangs here until the plot window is closed
我希望能够在进行命令行查询时查看绘图。 我正在使用 python 2.6.6 运行 Debian 挤压。 我的 ~/.matplotlib/matplotlibrc 包含
backend : GTKAgg
谢谢!
【问题讨论】:
-
尝试使用IPython
-
你的意思是
ipython -pylab获得多线程。
标签: python matplotlib