前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Github 推荐项目 | Jupyter 的 Matplotlib 交互图表扩展

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

作者头像
AI研习社
发布2018-08-06 14:27:33
1.5K0
发布2018-08-06 14:27:33
举报
文章被收录于专栏:AI研习社AI研习社

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

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

Github 链接:

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

用法:

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

代码语言:javascript
复制
%matplotlib widget

示例:

安装:

使用 conda 安装 ipympl:

代码语言:javascript
复制
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:

代码语言:javascript
复制
pip install ipympl
# If using JupyterLab
# Install nodejs: https://nodejs.org/en/download/
jupyter labextension install @jupyter-widgets/jupyterlab-manager

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

代码语言:javascript
复制
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
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-07-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 AI研习社 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档