Jupyter添加Plotly插件

本文详细介绍了如何在Jupyter环境中配置Plotly(版本4.5.0),包括安装NodeJS,Plotly库及Jupyter插件,实现美观的数据可视化效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

写在前面

使用Python做数据分析,最常用的IDE应该是Jupyter和Pycharm。
使用Python做报表展示,最常用的是Maplotlib,很方便,也很强大。但是如果要做的好看,那么用Plotly来代替Maplotlib应该是一个省时高效的方式。
本篇文章主要说明如何在Jupyter中使用Plotly(4.5.0)。

STEP 1.NodeJS

准备Jupyter插件编译环境,在Conda环境中安装NodeJS

conda install nodejs

STEP 2.安装Plotly

pip install plotly>=4.5.0

STEP 3.安装Jupyter插件,支持Plotly

安装Jupyter的widgets支持

jupyter labextension install @jupyter-widgets/jupyterlab-manager

安装Jupyter的plotlywidget插件

jupyter labextension install plotlywidget

安装Jupyter的plotly离线绘图支持插件

jupyter labextension install @jupyterlab/plotly-extension

结束

环境安装到此就结束了,可以自己去Jupyter中实验一把。

附:Plotly官方示例

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值