TypeError: annotate() missing 1 required positional argument: ‘text‘
TypeError: annotate() missing 1 required positional argument: 'text'
·
问题描述:annotate()缺少一个参数'text'。
问题原因:annotate()的's'参数自Matplotlib 3.3以来已重命名为'text',对旧名称的支持将在两个次要版本之后被放弃。
解决办法:把annotate(s=text)改为annotate(text=text)就可以了,或者把matplotlib包降到3.3以下也可以解决问题。
更多推荐
已为社区贡献1条内容
所有评论(0)