【发布时间】:2020-03-09 17:35:26
【问题描述】:
每当我尝试使用 matplotlib 在 Google Colab 笔记本中绘制图形时,每当我使用 %matplotlib inline 时都会显示一个绘图,但在我使用 %matplotlib ipympl 或 %matplotlib widget 时不会显示。我该如何解决这个问题。我的目标是让情节具有互动性。
澄清:当我运行
%matplotlib --list时,我得到以下输出
Available matplotlib backends: ['tk', 'gtk', 'gtk3', 'wx', 'qt4', 'qt5', 'qt', 'osx', 'nbagg', 'notebook', 'agg', 'inline', 'ipympl', 'widget']
感谢您的帮助!
【问题讨论】:
-
另外,我看过这个帖子:stackoverflow.com/questions/52859983/…。这里的解决方案都不适合我。
-
你有任何迹象表明 google colab 实际上支持这个jupyter-matplotlib 后端吗?我认为情况并非如此,因为它是在考虑 jupyter 的情况下明确编写的。
-
是的,我在上面澄清了
-
哦,colab 没有更改该列表。另见github.com/matplotlib/matplotlib/issues/15161。我的意思是你可以随时在 colab 询问他们是否计划很快支持这个。
标签: python matplotlib google-colaboratory