plot_dataframe3D: Visualize a three-dimensional data with labels and colors.

View source: R/plot.R

plot_dataframe3DR Documentation

Visualize a three-dimensional data with labels and colors.

Description

This function visualizes a three-dimensional data with labels and colors.

Usage

plot_dataframe3D(
  dataframe3D = NULL,
  labels = NULL,
  colors = NULL,
  theta = 30,
  phi = 30,
  title = "",
  xlabel = "",
  ylabel = "",
  zlabel = ""
)

Arguments

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.

Value

A scatter3D object in plot3D package.

Examples

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")


keita-iida/ASURATBI documentation built on Feb. 16, 2023, 9:37 a.m.