python - 更新 ipython 后出现问题 (%matplotlib nbagg)

标签 python matplotlib ipython ipython-notebook jupyter

我安装了 anaconda 发行版,我通常运行 ipython notebook --pylab inline。我使用 pip install (windows 8.1) 更新了 ipython,我不再需要编写 --pylab inline 来启动

我开始在单元格中写入:%matplotlib nbaggmatplotlib.use['nbagg'],但是当我绘制一些东西时它显示这个空框: enter image description here

我期待交互式绘图框。

ipython 日志显示:

[IPKernelApp] ERROR | No such comm: 7cfe982045bb4d0db0f14deff7258130

最佳答案

我猜这个问题是由于 matplotlib 版本太旧引起的。使用 %matplotlib nbaggipython>=3.0 需要 matplotlib>=1.4.3(注意 %matplotlib notebook%matplotlib nbagg 现在是同义词)。

通过 pip install --upgrade matplotlib 更新 matplotlib 可能会解决这个问题。另见我的 issue-7797在github上。感谢 jenshnielsen 提供此信息。

关于python - 更新 ipython 后出现问题 (%matplotlib nbagg),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29044867/

相关文章:

python - 尝试获取 panda 数据框中列表中的第一项

python - 如何存储多个不同长度的numpy一维数组并打印它

python - 如果我不提供任何静态内容,我是否需要 Nginx 和 Gunicorn?

python - 刻度线与 matplotlib 表中的单元格不对齐

python - matplotlib barh 计划工作时间与实际工作时间

python - python : Python 3 and 2 in IPython/Jupyter Notebook

python - 组合可匹配多个困惑股票条目的 RE

python-2.7 - TypeError : 'PathCollection' object is not iterable when adding second legend to plot

像 RStudio 一样的 Python 工作流?

bash - 从 IPython 执行 Bash 命令