plot_dataframe3D | R Documentation |
This function visualizes a three-dimensional data with labels and colors.
plot_dataframe3D( dataframe3D = NULL, labels = NULL, colors = NULL, theta = 30, phi = 30, title = "", xlabel = "", ylabel = "", zlabel = "" )
dataframe3D |
A dataframe with three columns. |
labels |
NULL or a vector of labels of all the samples, corresponding to colors. |
colors |
NULL or a vector of colors of all the samples, corresponding to labels. |
theta |
Angle of the plot. |
phi |
Angle of the plot. |
title |
Title. |
xlabel |
x-axis label. |
ylabel |
y-axis label. |
zlabel |
z-axis label. |
A scatter3D object in plot3D package.
data(pbmcs_eg) mat <- SingleCellExperiment::reducedDim(pbmcs_eg$CM, "UMAP")[, 1:3] dataframe3D <- as.data.frame(mat) labels <- SummarizedExperiment::colData(pbmcs_eg$CM)$seurat_clusters plot_dataframe3D(dataframe3D = dataframe3D, labels = labels, colors = NULL, theta = 45, phi = 20, title = "PBMC (CO & MSigDB)", xlabel = "UMAP_1", ylabel = "UMAP_2", zlabel = "UMAP_3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.