在Spyder中,使用Matplotlib和交互式缩放等进行绘图
我最近已从Enthought Canopy切换到Anaconda,并且正在使用Spyder IDE.我注意到当我绘制一些数据时,
I've recently switched from Enthought Canopy to Anaconda and am using the Spyder IDE. I've noticed that when I plot some data,
import matplotlib.pyplot as plt
plt.figure()
plt.plot(rigs2)
plt.ion()
plt.show()
它在IPython控制台中显示为嵌入式图形:
It shows up as an inline figure in the IPython console:
但是,在Enthought中,过去通常是将情节显示在具有缩放,后退和前进按钮的单独窗口中.有什么方法可以在Spyder中实现相同目标吗?
However, in Enthought it used to be that the plot would show up in a separate window with zoom, back, and forward buttons. Is there any way to achieve the same in Spyder?
从菜单Tools > Preferences
中选择,然后在左侧的类别列表中选择IPython console
,然后在顶部的选项卡Graphics
中进行更改Graphics backend
从 Inline 到例如 Qt .
但是对我来说,这些数字总是在背景中弹出.
(我使用了与WinPython 3.4捆绑在一起的Spyder 3.0.0dev.)
Select from the menu Tools > Preferences
, then IPython console
in the list of categories on the left, then the tab Graphics
at the top, and change the Graphics backend
from Inline to e.g. Qt.
For me though, the figures then always pop up in the background.
(I use Spyder 3.0.0dev bundled with WinPython 3.4.)