当在jupyter notebook里面想要生成可互动的图时,用魔法命令
%matplotlib notebook 或者 %matplotlib widget
报错:matplotlib notebook IPython is not defined
解决办法:
conda install -c conda-forge ipympl
conda install -c conda-forge nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib
然后就可以了