我有一组xyz坐标,我正试图用它来绘制一个三维图形。我的文本文件每行有3个值,每个值用“制表符”间距分隔。在
我的代码如下:xv = []
yv = []
zv = []
fig6 = plt.figure()
ax6 = fig6.gca(projection='3d')
with open('C:\Python27\Generate_Data\Posi_ture1803.txt') as f:
for line in f:
a, b, c = line.split('\t')
xv.append(a)
yv.append(b)
zv.append(c)
ax6.plot(xv, yv, zs=zv, label='True Position')
ax6.legend()
以下是我的错误:
^{pr2}$
我的价值观如下0 0 0
4.755282581 1.545084972 1
9.510565163 3.090169944 2
14.26584774 4.635254916 3
19.02113033 6.180339887 4