晚上在用anaconda的Spyder IDE,用 matplotlib 画图时不会显示图片在iPython
终端中,报错如下:
Figures now render in the Plots pane by default. To make them also appear inline in the Console, uncheck "Mute Inline Plotting" under the Plots pane options menu.
网上查找资料后发现问题所在:python - Spyder Plot Inline - Stack Overflow
说的是最新版本的Spyder 4.0
默认显示图片在右上角,不显示在终端中,如图所示:
想要弹出窗口显示matplotlib
画的图片,修改设置:
Tools
> Preferences
> iPython console
> Graphics
> Graphics backend
> Automatic
重启IDE,现在画图就会弹出窗口显示了。
文档信息
- 本文作者:last2win
- 本文链接:https://last2win.com/2020/01/31/python-anaconda-matplotlib-fix-bug/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)