% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-ml.R
\name{geom_embedding}
\alias{geom_embedding}
\title{Embedding scatter (t-SNE / UMAP / PCA)}
\usage{
geom_embedding(
  mapping = NULL,
  data = NULL,
  hull = TRUE,
  size = NULL,
  alpha = NULL
)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map the two embedding
dimensions to \code{x} and \code{y}, and the cluster to \code{color}.}

\item{hull}{Draw a convex hull around each cluster.}

\item{size}{Point radius.}

\item{alpha}{Point opacity.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
A two-dimensional embedding scatter with optional cluster hulls, so
cluster shape is visible rather than inferred from point color alone.
}
\examples{
set.seed(1)
d <- data.frame(
  d1 = c(rnorm(30), rnorm(30, 4)), d2 = c(rnorm(30), rnorm(30, 3)),
  cl = rep(c("a", "b"), each = 30)
)
ggnext(d, aes(d1, d2, color = cl)) + geom_embedding()
}
