我有一个由 8 列组成的简单文本文件,我使用 loadtxt 函数读取它。我想绘制为 x 轴 column6-column7 和 y 轴 column7-column8 所以我把这个命令
>>> pl.plot(np.subtract(data2[:,6], data2[:7]), np.subtract(data2[:,7], data2[:,8]))
and it gave this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: operands could not be broadcast together with shapes (59427) (7,9)
问题是什么?以及如何做到这一点?