Matplotlib图数据

问题描述

要做什么:

在for循环中,追加到列表中。如果在该循环中满足要求,则将其追加到另一个,然后对其进行绘图。我该怎么做:

图形代码

style.use("ggplot")
plt.plot(attempts,score)
plt.show()

当我使用两个普通列表时,它不起作用。我尝试了numpy数组,但得到了:

ValueError: all the input arrays must have same number of dimensions,but the array at index 0 has 1 dimension(s) and the array at index 1 has 0 dimension(s)

使用类似的列表:

np.append(score,acc,axis=None)

什么代码可以工作?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)