matplotlib之__main__:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, s

如果遇到问题:

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

 

解决方案:

在程序中增加一条语句:

import matplotlib

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

上一篇:MATLAB 2D绘图


下一篇:Matplotlib的使用