当前位置:   article > 正文

解决matplotlib画图module ‘backend_interagg‘ has no attribute ‘FigureCanvas‘的问题_has no attribute 'figurecanvas

has no attribute 'figurecanvas

方法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

运行结果如下图所示

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/884307
推荐阅读
相关标签
  

闽ICP备14008679号