# 都知道matplotlib在jupyter notebook或者在lab里面是默认情况不能交互的
解决方法:
conda install -c conda-forge ipympl
pip install ipympl
选择一个即可(conda或者pip)
安装上面,然后在jupyter notebook里面加入:
%matplotlib widget
即可
如果希望在jupyter lab里面使用,还要运行安装下面内容:
conda install -c conda-forge nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter lab build