Plot cell xyz data with grid or rgl package.
view3dCells(
cells,
x,
y,
z,
color = "blue",
colorFun = function(x, pal = seq.int(8)) {
if (is.character(x))
x <-
as.numeric(factor(x))
limits <- range(x)
pal[findInterval(x, seq(limits[1],
limits[2], length.out = length(pal) + 1), all.inside = TRUE)]
},
shape = "sphere",
radius = 0.1,
tag = "cell",
renderer = c("rgl", "threejs", "none"),
...
)
A data.frame.
Column names of x, y, z.
The column names for color, shape, radius or the value(length=1) of them.
The function to map values into colors.
The tag for controller.
The renderer of the 3D plots. Could be rgl or threejs. The threejs will create a htmlwidgets. If 'none' is set, a list of object will be returned.
Not used.
A list of threeJsGeometry objects or a htmlwidget.
cells <- readRDS(system.file("extdata", "pbmc_small.3d.rds",
package = "geomeTriD"
))
view3dCells(cells,
x = "umap_1", y = "umap_2", z = "umap_3",
color = "nCount_RNA",
renderer = "threejs"
)