I have some line which is segmented into 5 sections like this:
xx = np.linspace(positions[k][0], positions[l][0], 5)
yy = np.linspace(positions[k][1], positions[l][1], 5)
zz = np.linspace(positions[k][2], positions[l][2], 5)
ax.plot(xx[0], yy[0], zz[0], color = 'Grey', linewidth = 1, linestyle = linestyle)
however, I fail to plot only the first (and the last) segment. The error is TypeError: object of type 'numpy.float64' has no len()
How to correct the code (tried with xx[[0]]) or how to draw only two segments from the beginning and the end of the line with a defined length?