python-3.x - Matplotlib 停止迭代异常
问题描述
我正在使用for
Jupyter-Lab 中的循环进行绘图。但是,在第 10 次情节之后,我不断收到StopIteration
异常。知道为什么吗?
for i in range(0,14):
plt.figure()
plt.scatter(y=y, x=X[:,0], color=next(colors), marker='.', label="")
plt.legend(loc='lower right')
plt.title("")
plt.xlabel("Feature")
plt.ylabel("Response")
plt.show()
StopIteration:
<Figure size 432x288 with 0 Axes>
解决方案
推荐阅读
- c++ - 通过引用传递对 lambda 的引用
- linux - Kubernetes 工作空间中的持久卷和声明
- css - 将元素放置在“闪亮”应用程序中,以便它们调整移动和桌面显示器的大小
- ios - 将 Powerapps 投射到 Chromecast
- solr - 分片处于“恢复”状态,副本都处于“活动状态”
- postgresql - 在 Postgresql 中删除字符
- apache-spark - 如何将带有时区的奇怪日期时间字符串转换为时间戳(PySpark)
- android - 如何在Android上的recyclerView中使用多个计时器
- android - 调试输出上的 Android net::ERR_CACHE_MISS
- python - 暂停 Jupyter Notebook 小部件,等待用户输入