Plot points in 3D.
Arguments
- pts
A vector or matrix with the points.
- addText
Add text to the points. Currently
coord
(coordinates),rownames
(rownames) andboth
supported or a vector with the text.- ...
Further arguments passed on the the RGL plotting functions. This must be done as lists (see examples). Currently the following arguments are supported:
argsPlot3d
: A list of arguments forrgl::plot3d
.argsPch3d
: A list of arguments forrgl::pch3d
.argsText3d
: A list of arguments forrgl::text3d
.
Examples
# \donttest{
ini3D()
pts<-matrix(c(1,1,1,5,5,5), ncol = 3, byrow = TRUE)
plotPoints3D(pts)
plotPoints3D(c(2,3,3), argsPlot3d = list(col = "red", size = 10))
plotPoints3D(c(3,2,3), argsPlot3d = list(col = "blue", size = 10, type="p"))
plotPoints3D(c(1.5,1.5,1.5), argsPlot3d = list(col = "blue", size = 10, type="p"))
plotPoints3D(c(2,2,2, 1,1,1), addText = "coord")
ids <- plotPoints3D(c(3,3,3, 4,4,4), addText = "rownames")
finalize3D()
3D plot
rgl::rglwidget()
3D plot
# pop3d(ids) # remove the last again
# }