Creates a custom feature plot for visualizing a feature's values on a reduced dimension embedding (e.g., UMAP or t-SNE).
CustomFeaturePlot(
coord,
value,
reduction = NULL,
dims = 1:2,
value_name = NULL,
title_name = NULL,
order_point = TRUE
)
A Seurat object or a matrix of coordinates. If a Seurat object is provided, embeddings will be extracted from Seurat.
A vector of values to plot. If coord
is a Seurat object, value
can be a column name from coord@meta.data
.
Character; the name of the reduction embedding to use (e.g., "umap", "tsne"). Default is NULL.
A vector specifying which dimensions to use. Default is c(1,2).
Character; the name of the value to be used in the plot legend. Default is NULL.
Character; the title of the plot. Default is NULL.
Logical; whether to order points by value. Default is TRUE.
A ggplot2 object representing the custom feature plot.