【发布时间】:2017-05-11 03:34:02
【问题描述】:
我想创建一个带有交互式 matplotlib 绘图的笔记本。我可以显示静态图(%matplotlib inline 工作正常),但%matplotlib notebook 没有显示任何图形,既不在笔记本内,也不作为弹出窗口。
conda 安装了 ipython 5.1.0, jupyter 4.0.6 matplotlib 2.0 ('2.0.0b4+2344.g7b27a1b')
这是笔记本https://github.com/fedhere/notebookTests/blob/master/mplnotebook_test.ipynb
我做错了什么?谢谢你
【问题讨论】:
-
IPython 5.1.0、jupyter 4.2.1 和 matplotlib 1.5.1 (python3) 对我来说很好用。是python2还是python3?
-
也不是很遗憾,但上面的参数是针对python3的
-
它适用于我在 python 2.7 上的 jupyter 4.0.6 和 matplotlib 1.5。请注意,将后端从 inline 更改为 notebook 可能并不总是有效,那么即使使用新启动的内核也会出现此问题吗?另请参阅this question。
标签: python matplotlib plot jupyter