Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

identify3d

Identify points in plot


Description

Identify points in a plot, similarly to the identify function in base graphics.

Usage

identify3d(x, y = NULL, z = NULL, labels = seq_along(x), n = length(x), 
	plot = TRUE, adj = c(-0.1, 0.5), tolerance = 20, 
	buttons = c("right", "middle"))

Arguments

x, y, z

coordinates of points in a scatter plot. Alternatively, any object which defines coordinates (see xyz.coords) can be given as x, and y and z left missing.

labels

an optional character vector giving labels for the points. Will be coerced using as.character, and recycled if necessary to the length of x.

n

the maximum number of points to be identified.

plot

logical: if plot is TRUE, the labels are printed near the points and if FALSE they are omitted.

adj

numeric vector to use as adj parameter to text3d when plotting the labels.

tolerance

the maximal distance (in pixels) for the pointer to be ‘close enough’ to a point.

buttons

a length 1 or 2 character vector giving the buttons to use for selection and quitting.

Details

If buttons is length 1, the user can quit by reaching n selections, or by hitting the escape key, but the result will be lost if escape is used.

Value

A vector of selected indices.

Author(s)

Duncan Murdoch

See Also

identify for base graphics, select3d for selecting regions.


rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.