% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{plot_clusters}
\alias{plot_clusters}
\title{Plot Clusters in 2D Space}
\usage{
plot_clusters(
  data,
  cluster_col = "cluster",
  x_col = NULL,
  y_col = NULL,
  centers = NULL,
  title = "Cluster Plot",
  color_noise_black = TRUE
)
}
\arguments{
\item{data}{A data frame with cluster assignments}

\item{cluster_col}{Name of cluster column (default: "cluster")}

\item{x_col}{X-axis variable (if NULL, uses first numeric column)}

\item{y_col}{Y-axis variable (if NULL, uses second numeric column)}

\item{centers}{Optional data frame of cluster centers}

\item{title}{Plot title}

\item{color_noise_black}{If TRUE, color noise points (cluster 0) black}
}
\value{
A \code{\link[ggplot2]{ggplot}} object.
}
\description{
Visualize clustering results using first two dimensions
or specified dimensions
}
\examples{
\donttest{
km <- tidy_kmeans(iris[, 1:4], k = 3)
clustered <- augment_kmeans(km, iris[, 1:4])
plot_clusters(clustered)
}
}
