在Spyder中,使用Matplotlib和交互式缩放等进行绘图 [英] In Spyder, plot using Matplotlib with interactive zoom, etc

查看:644
本文介绍了在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.)

这篇关于在Spyder中,使用Matplotlib和交互式缩放等进行绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆