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

如果遇到问题:

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

 

解决方案:

在程序中增加一条语句:

import matplotlib

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

posted @ 2020-01-21 12:29  重大的小鸿  阅读(4796)  评论(0编辑  收藏  举报