问题
Python绘图过程中报错:AttributeError: module ‘backend_interagg’ has no attribute ‘FigureCanvas’
解决方法
代码前引入:
import matplotlib
matplotlib.use('TkAgg')
完整测试代码
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('TkAgg')
plt.figure()
plt.plot([1, 2, 3], [.6, .7, .3])
plt.show()
所有评论(0)