第一步要先安装好下面的。
conda install -y nodejs
pip install ipympl
pip install --upgrade jupyterlab
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib
jupyter nbextension enable --py widgetsnbextension
然后在代码块的前面加上%matplotlib widget
然后再画matplotlib就行了
https://stackoverflow.com/questions/50149562/jupyterlab-interactive-plot#comment87317234_50149562