module 'matplotlib' has no attribute 'plot'
时间: 2023-09-26 07:07:04 浏览: 61
"module 'matplotlib' has no attribute 'plot'"这个错误通常是由于导入模块的方式不正确导致的。在你的代码中,错误的写法是import matplotlib as plt,正确的写法是import matplotlib.pyplot as plt。正确的导入方式可以确保你可以正确地使用matplotlib.pyplot中的plot函数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [python matplotlib.pyplot.plot()参数用法](https://download.csdn.net/download/weixin_38697579/12853320)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [【Python-BUG】module ‘matplotlib‘ has no attribute ‘plot](https://blog.csdn.net/kz_java/article/details/120888376)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [matplotlib.pyplot.plot()参数使用详解](https://download.csdn.net/download/weixin_38627826/12849449)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]