plotPoints3D: Plot points in 3D.

View source: R/plot.R

plotPoints3DR Documentation

Plot points in 3D.

Description

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:

  • argsPlot3d: A list of arguments for rgl::plot3d.

  • argsPch3d: A list of arguments for rgl::pch3d.

  • argsText3d: A list of arguments for rgl::text3d.

Value

Object ids (invisible).

Examples


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


gMOIP documentation built on May 31, 2023, 8:45 p.m.