View source: R/Seurat.Utils.Visualization.R
SeuratColorVector | R Documentation |
Extracts and optionally displays the color scheme assigned to cluster identities
within a Seurat object, facilitating consistent color usage across visualizations. You can
check results in a barplot with MarkdownHelpers::color_check()
.
SeuratColorVector(
ident = NULL,
obj = combined.obj,
plot.colors = FALSE,
simple = FALSE
)
ident |
Specific clustering identity to use for color extraction.
If NULL, the active identity in |
obj |
Seurat object from which to extract cluster colors.
Default: |
plot.colors |
If TRUE, visually displays the color scheme.
Default: |
simple |
If TRUE, returns only the unique set of colors used.
If FALSE, returns a named vector mapping cluster identities to colors.
Default: |
hue_pal
## Not run:
# Display colors for the active identity
SeuratColorVector()
# Retrieve and plot colors for a specified clustering identity
SeuratColorVector(ident = "RNA_snn_res.1", plot.colors = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.