layer3D.callback {ivue}R Documentation

Callback Layers

Description

An advanced escape hatch for drawing with rgl. The callback must not open, close, or switch devices. Its context contains X, row.ids (integer positions), observation.ids (coordinate row names, or NULL), colors, highlight, and draw.ids (row, object, index). Captured object IDs are not live devices.

Usage

layer3D.callback(fun, args = list())

Arguments

fun

Function called with context as its first argument.

args

Named list of additional arguments to fun.

Value

An ivue_layer specification.

Examples

labels <- layer3D.callback(function(ctx) {
  rgl::text3d(ctx$X[1, , drop = FALSE], texts = "First point")
})
if (nzchar(system.file(package = "rgl"))) {
  w <- plot3D.plain(matrix(1:9, ncol = 3), layers = list(labels))
}

[Package ivue version 0.1.0 Index]