jupyter Notebook 上 matplotlib 绘图中的缩放和平移选项

Tan*_*ore 5 python matplotlib python-2.7 jupyter-notebook

我想为在 jupyter notebook 上的 matplotlib 中生成的图提供缩放和平移选项。我尝试安装 mpld3 但导入包根本不会生成我的图。这是我使用的 Anaconda 版本(Anaconda2)的问题吗?我应该怎么做才能修复它?任何帮助表示赞赏,谢谢

hin*_*tze 0

对我来说,以下方法有效:

  1. 安装 ipympl,matplotlib 绘制的后端,是交互式的:pip install ipymplconda install ipymplipympl install in jupyter-notebook (python3)
  2. 安装 ipywidgets,jupyter 的东西 ipympl 需要绘制:pip install ipywidgets或者conda install ipywidgetsIPython Notebook ipywidgets 不显示
  3. 使用 matplotlib 魔法:%matplotlib ipympl

相关其他问题: