library(rgl)
saveopts <- options(rgl.useNULL = TRUE)
open3d()
ids <- plot3d((-10):10, rnorm(21), rnorm(21))
vertexControl(values = 10:(-10),
vertices = 11, attributes="x", objid=ids["data"])
options(saveopts)
Run the code above in your browser using DataCamp Workspace