% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gedi_plots.R
\name{plot_features}
\alias{plot_features}
\title{Plot Multiple Features on Embedding}
\usage{
plot_features(
  model,
  features,
  embedding = "umap",
  projection = "zdb",
  color_limits = "global",
  ncol = NULL,
  randomize = TRUE,
  point_size = 0.2,
  alpha = 0.9,
  title = NULL
)
}
\arguments{
\item{model}{GEDI model object}

\item{features}{Character vector of gene names or integer indices}

\item{embedding}{Character specifying embedding type ("umap", "pca") or
a custom N x 2 matrix}

\item{projection}{Character, type of projection to compute ("zdb" or "db")}

\item{color_limits}{Character ("global" for shared scale, "individual" for
per-facet scale) or numeric vector c(low, high)}

\item{ncol}{Integer, number of columns in facet layout}

\item{randomize}{Logical, whether to randomize point order}

\item{point_size}{Numeric, size of points}

\item{alpha}{Numeric, transparency of points}

\item{title}{Character, plot title}
}
\value{
ggplot2 object with faceted features
}
\description{
Efficiently plots multiple gene features on a 2D embedding using faceting.
Computes projections on-the-fly without storing full ZDB matrix.
}
\examples{
\donttest{
if (requireNamespace("SeuratObject", quietly = TRUE) &&
    requireNamespace("uwot", quietly = TRUE)) {
  pbmc_small <- SeuratObject::pbmc_small
  model <- CreateGEDIObject(
    Samples = pbmc_small@meta.data$orig.ident,
    M       = pbmc_small@assays$RNA@counts,
    K       = 3,
    verbose = 0
  )
  model$train(iterations = 5)
  plot_features(model, c(1, 2), embedding = "pca")
}
}

}
