ValueError: x and y must have same first dimension, but have shapes (1,) and (10,)
时间: 2024-04-10 15:32:25 浏览: 33
这个错误通常在使用 matplotlib 绘图时出现,它表示 x 和 y 的维度不匹配。你提供的 x 和 y 数组的长度不同,x 的长度为 1,而 y 的长度为 10。为了解决这个问题,你需要确保 x 和 y 的长度是相同的,或者使用正确的数据来绘制图形。你可以通过检查数据或者重新调整数据的维度来解决这个错误。希望这个回答能够帮到你!如果你还有其他问题,请随时提问。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)