赞
踩
方法1:
解决AttributeError: module ‘backend_interagg‘ has no attribute ‘FigureCanvas‘的问题_attributeerror: module 'backend_interagg' has no a-CSDN博客
打开pycharm中的文件->设置->Python Scientific,
按照如下设置: 1.取消在工具窗口中显示绘图 2.应用 3.确定
方法2:
import matplotlib.pyplot as plt
matplotlib.use('TkAgg')
方法3:更换matplotlib版本
PyCharm中解决Matplotlib绘图时AttributeError: module ‘backend_interagg‘ has no attribute ‘FigureCanvas‘问题_matplotlib_鹰KING-华为开发者联盟HarmonyOS专区
方法4:结合方法3+方法1
运行结果如下图所示