Plot embedding
plot_embedding(
matrix,
labels = NULL,
method = "pca",
colors = RColorBrewer::brewer.pal(length(unique(labels)), "Set1"),
seed = 1,
point_size = 1,
cores = 1
)
An embedding plot
data("example_matrix")
samples_use <- 1:200
plot_data <- example_matrix[samples_use, ]
labels <- sample(
c("A", "B", "C", "D", "E"),
nrow(plot_data),
replace = TRUE
)
plot_embedding(
plot_data,
labels,
method = "pca",
point_size = 2
)
plot_embedding(
plot_data,
labels,
method = "tsne",
point_size = 2
)