Github 推荐项目 | Jupyter 的 Matplotlib 交互图表扩展

2018 年 7 月 30 日 AI研习社

利用 Jupyter 交互式小部件框架,jupyter-matplotlib 可以在 Jupyter notebook 和 Jupyterlab 中实现 matplotlib 的交互功能。

此外,canvas 是一个合适的 Jupyter 交互式小部件,可以定位在交互部件的 Layout 上。

Github 链接:

https://github.com/matplotlib/jupyter-matplotlib

用法:

要启用 jupyter-matplotlib 后端,只需使用 matplotlib:

%matplotlib widget

示例:

安装:

使用 conda 安装 ipympl:

conda install -c conda-forge ipympl
If using the Notebook
conda install -c conda-forge widgetsnbextension
If using JupyterLab
conda install nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager

使用pip安装ipympl:

pip install ipympl
If using JupyterLab
Install nodejs: https://nodejs.org/en/download/
jupyter labextension install @jupyter-widgets/jupyterlab-manager

对于开发安装(需要节点)

git clone https://github.com/matplotlib/jupyter-matplotlib.git
cd jupyter-matplotlib
pip install -e .
jupyter nbextension install --py --symlink --sys-prefix ipympl
jupyter nbextension enable --py --sys-prefix ipympl
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension link ./js
cd js && npm run watch
# Launch jupyterlab as `jupyter lab --watch` in another terminal


想阅读更多编程文章文章

欢迎点击“阅读原文”

或者移步 AI 研习社社区~

登录查看更多
1

相关内容

Jupyter Notebook是以网页的形式打开,可以在网页页面中直接编写代码和运行代码,代码的运行结果也会直接在代码块下显示的程序。如在编程过程中需要编写说明文档,可在同一个页面中直接编写,便于作及时的说明和解释。
【资源】100+本免费数据科学书
专知会员服务
108+阅读 · 2020年3月17日
【2020新书】数据科学:十大Python项目,247页pdf
专知会员服务
216+阅读 · 2020年2月21日
一网打尽!100+深度学习模型TensorFlow与Pytorch代码实现集合
计算机视觉最佳实践、代码示例和相关文档
专知会员服务
19+阅读 · 2019年10月9日
【电子书推荐】Data Science with Python and Dask
专知会员服务
44+阅读 · 2019年6月1日
Github项目推荐 | Pytorch TVM 扩展
AI研习社
11+阅读 · 2019年5月5日
Github项目推荐 | gensim - Python中的主题建模
AI研习社
15+阅读 · 2019年3月16日
Github项目推荐 | RecQ - Python推荐系统框架
AI研习社
8+阅读 · 2019年1月23日
Arxiv
38+阅读 · 2020年3月10日
Arxiv
7+阅读 · 2018年6月8日
Arxiv
4+阅读 · 2018年4月30日
Arxiv
6+阅读 · 2018年3月28日
Arxiv
6+阅读 · 2018年2月7日
VIP会员
Top
微信扫码咨询专知VIP会员