Jupyter Notebook 交互式绘图

最近更新于 2024-05-05 12:31

Jupyter Notebook 使用 Matplotlib 绘制的图像默认是静态的,无法进行拖动和缩放等交互操作。
file

安装支持

pip install ipympl

然后可以使用魔术命令%matplotlib widget开启交互模式

于 2023.10.8 在下面环境测试
Python 3.9.2
Jupyter Notebook 7.0.4

file

Jupyter Notebook 交互式绘图
Scroll to top