【问题标题】:TypeError: got an unexpected keyword argument 'orientation' when plotting with pltTypeError:使用 plt 绘图时出现意外的关键字参数 \'orientation\'
【发布时间】:2022-10-18 22:21:23
【问题描述】:

我有一个完美的工作脚本来从管道生成一些图表。但是,然后我不正确地重新启动了 Docker,现在当我想调用 plt.show()plt.savefig() 时,我会遇到 TypeError: got an unexpected keyword argument 'orientation'.

我假设这是 matplotlib 后端有问题。我尝试重新安装各种版本的 matplotlib,但没有任何效果。我什至尝试设置不同的 matplotlib 后端

import matplotlib as mpl
mpl.use(option) 

有所有可能的选择。大多数甚至不工作,或产生不同的错误。

我真的不明白一切是如何正常工作的,但现在不是。任何帮助表示赞赏!

【问题讨论】:

    标签: python matplotlib


    【解决方案1】:

    更新到 matplotlib 3.6.1 后,我收到了同样的错误。

    返回版本 3.5.2 为我解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2020-09-12
      • 1970-01-01
      • 2018-03-28
      • 2015-02-12
      • 1970-01-01
      • 2014-02-24
      • 1970-01-01
      • 2022-07-09
      • 2021-09-19
      相关资源
      最近更新 更多