module 'matplotlib' has no attribute 'show'
时间: 2023-09-18 11:13:20 浏览: 36
This error message indicates that the 'show' function from the 'matplotlib' module cannot be found.
There could be a few reasons for this error:
1. You may have misspelled the function name or imported the wrong module. Double-check your code to make sure you have imported the correct module and spelled the function name correctly.
2. There could be an issue with your installation of matplotlib. Try reinstalling matplotlib using pip or conda.
3. You may have imported the module incorrectly. Make sure you are importing the 'pyplot' submodule of matplotlib and using it to call the 'show' function.
Here is an example of the correct way to import and use the 'show' function from the 'pyplot' submodule of matplotlib:
```
import matplotlib.pyplot as plt
# your plotting code here
plt.show()
```
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)