码迷,mamicode.com
首页 > 其他好文 > 详细

matplotlib之__main__:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

时间:2020-01-21 13:20:43      阅读:545      评论:0      收藏:0      [点我收藏+]

标签:The   end   currently   增加   strong   gui   which   font   ken   

如果遇到问题:

__main__:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

 

解决方案:

在程序中增加一条语句:

import matplotlib

matplotlib.use(‘TkAgg‘) (增加这条语句)

matplotlib之__main__:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

标签:The   end   currently   增加   strong   gui   which   font   ken   

原文地址:https://www.cnblogs.com/elitphil/p/12221345.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!