I am using the plot3d
function from the rgl
package. I have generated spheres using xyz co-ordinate data and I want to connect them with single line.
Here is my code:
file=read.table("input.txt")
df=data.frame(x=file[,1],y=file[,2],z=file[,3], color=file[,4])
plot3d(df$x, df$y, df$z, col=df$col, type='b')
where b is for points joined by lines
If I use s instead of b it is giving me only spheres.