Add points to a 3D scatterplot
points3d(s, x, y, z, color = "orange", pch = "@", size = 1, labels = "")A non-animated scatterplot object returned by scatterplot3js.
Either a vector of x-coordinate values or a three-column data matrix with columns corresponding to the x,y,z coordinate axes. Column labels, if present, are used as axis labels.
(Optional) vector of y-coordinate values, not required if
x is a matrix.
(Optional) vector of z-coordinate values, not required if
x is a matrix.
Either a single hex or named color name (all points same color),
or a vector of hex or named color names as long as the number of points in x.
Optional point glyphs or text strings, see scatterplot3js.
The plot point radius, either as a single number or a
vector of sizes of length nrow(x).
Character vector of length x of point labels displayed when the mouse moves over the points.
A new scatterplot htmlwidget object.
This function replaces the old points3d approach used by scatterplot3d.
if (FALSE) { # \dontrun{
# Adding point labels to a scatterplot:
x <- rnorm(5)
y <- rnorm(5)
z <- rnorm(5)
scatterplot3js(x, y, z, pch="o") %>%
points3d(x + 0.1, y + 0.1, z, color="red", pch=paste("point", 1:5))
# Adding point labels to a graph, obtaining the graph vertex coordinates
# with the `vertices()` function:
data(LeMis)
graphjs(LeMis) %>% points3d(vertices(.), color="red", pch=V(LeMis)$label)
} # }