Skip to contents

Plot points in 3D.

Usage

plotPoints3D(pts, addText = FALSE, ...)

Arguments

pts

A vector or matrix with the points.

addText

Add text to the points. Currently coord (coordinates), rownames (rownames) and both 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:

Value

Object ids (invisible).

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()


rgl::rglwidget()


# pop3d(ids) # remove the last again
# }