python - 在 Spyder 中,使用 Matplotlib 和交互式缩放等进行绘图

标签 python matplotlib plot spyder

我最近从 Enthought Canopy 切换到 Anaconda 并使用 Spyder IDE。我注意到当我绘制一些数据时,

import matplotlib.pyplot as plt
plt.figure()
plt.plot(rigs2)
plt.ion()
plt.show()

它在 IPython 控制台中显示为内联图形:

Result from the plt.plot() command

但是,在 Enthought 中,绘图通常会显示在带有缩放、后退和前进按钮的单独窗口中。有什么方法可以在 Spyder 中实现同样的效果吗?

最佳答案

从菜单中选择 Tools > Preferences,然后选择左侧类别列表中的 IPython console,然后选择选项卡 Graphics顶部,并将 Graphics backendInline 更改为例如Qt
不过对我来说,数字总是在背景中弹出。
(我使用与 WinPython 3.4 捆绑在一起的 Spyder 3.0.0dev。)

关于python - 在 Spyder 中,使用 Matplotlib 和交互式缩放等进行绘图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36700083/

相关文章:

python - 使用 Python 进行 Spotify API 身份验证

python - 将数据帧附加到多处理目标函数之外的列表

python - 为什么无法在图例旁边进行注释?

python - 如何在 Matplotlib 中反转轴并设置极坐标图的零位置?

r - ggplot2 中的针状图

java - 如何在 Python 中指定 AES key ?

python - 在python中将fetch_all数组转换为单个数组

pandas - 带有 Pandas 系列的 matplotlib 双条形图

python - 如何更改轴时间限制

python - 计算时间差,如果差值大于一个小时,标记为 'missing' ,在该区域的折线图中绘制差距