不同的IDE设置方法不同
Spyder
Anaconda Spyder中写好画图的代码,有时候并不会直接在Ipython console中出来图训练的过程,我们需要在Ipython console中输入以下命令才可以:
(1)直接在窗口输出图片结果:
在Ipython console中输入命令:In[1]:matplotlib inline
(2)在图片小窗口输出动图图片:
在Ipython console中输入命令:In[2]:matplotlib qt
pycharm
pycharm中可与取消matplotlib默认输出到sciview,取消Settings---- Tools ----Python Scientific ----Show plots in toolwindow勾选项,这样就不会再sciview中运行了。
https://blog.youkuaiyun.com/luckygirl0809/article/details/79929628