% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-ml.R
\name{geom_silhouette}
\alias{geom_silhouette}
\title{Clustering silhouette plot}
\usage{
geom_silhouette(mapping = NULL, data = NULL, alpha = NULL)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map the silhouette width
to \code{x} and the cluster to \code{y} (or \code{color}).}

\item{alpha}{Bar opacity.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
Sorted silhouette widths grouped by cluster, with the mean marked — the
standard visual check on how well-separated a clustering is.
}
\examples{
set.seed(1)
d <- data.frame(
  cluster = rep(c("1", "2", "3"), each = 20),
  width = c(runif(20, .3, .9), runif(20, .1, .7), runif(20, -.1, .6))
)
ggnext(d, aes(width, cluster, color = cluster)) + geom_silhouette()
}
