【2022】解决:UserWarning: Matplotlib is currently using agg, which is a non-GUI backend
解决: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
·
解决方法:
在程序模块导入部分找到自己的import matplotlib.pyplot as plt
(必须是最先导入matplotlib模块),在上方增加如下代码
import matplotlib
matplotlib.use('TkAgg')
如图:
Done!
更多推荐
已为社区贡献1条内容
所有评论(0)