I am using rgl
plot3d
function to plot 3d points from Multidimensional scaling. So far I can draw the points as spheres using type="s"
, I can rotate the plots as I need:
plot3d(x,y,z,type = "s", col=rainbow(20), size= 4,xlab="F1",ylab="F2",zlab="F3",main=title.main,box=TRUE,top=TRUE).
I know that I can get this using rgl
scatter3d
function but this is used scatters/regression ... and I can also do this with scatterplot3d
, but I can't rotate this one. I would have imagined that if it is possible to do this using rgl
scatter3d
function. I would expect that it would be easy in rgl
plot3d
function... but I haven't figure out how to plot these vertical lines from the points(spheres)
using plot3d
? If I use type = "h"
it only draws vertical lines to the x–y plane and I don't see a separate parameter to draw the spheres.
Try:
> x=1:10
> y=21:30
> z=51:60
> plot3d(x,y,z, type='s')
> plot3d(x,y,z, type='h',add=TRUE)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.