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
)

Arguments

coord

A Seurat object or a matrix of coordinates. If a Seurat object is provided, embeddings will be extracted from Seurat.

value

A vector of values to plot. If coord is a Seurat object, value can be a column name from coord@meta.data.

reduction

Character; the name of the reduction embedding to use (e.g., "umap", "tsne"). Default is NULL.

dims

A vector specifying which dimensions to use. Default is c(1,2).

value_name

Character; the name of the value to be used in the plot legend. Default is NULL.

title_name

Character; the title of the plot. Default is NULL.

order_point

Logical; whether to order points by value. Default is TRUE.

Value

A ggplot2 object representing the custom feature plot.