问题描述:AttributeError: module ‘matplotlib’ has no attribute ‘plot’
解决方法:把import matplotlib as plt 改成 import matplotlib.pyplot as plt 即可
在Python编程中遇到AttributeError,提示'module 'matplotlib' has no attribute 'plot'。该问题通常由于导入matplotlib库的方式不正确导致。解决方案是将导入语句从`import matplotlib as plt`改为`import matplotlib.pyplot as plt`,确保正确引用matplotlib的pyplot子模块。
问题描述:AttributeError: module ‘matplotlib’ has no attribute ‘plot’
解决方法:把import matplotlib as plt 改成 import matplotlib.pyplot as plt 即可
1万+
4463
2999

被折叠的 条评论
为什么被折叠?