View source: R/visualization.R
| plot_clusters | R Documentation |
Visualize clustering results using first two dimensions or specified dimensions
plot_clusters(
data,
cluster_col = "cluster",
x_col = NULL,
y_col = NULL,
centers = NULL,
title = "Cluster Plot",
color_noise_black = TRUE
)
data |
A data frame with cluster assignments |
cluster_col |
Name of cluster column (default: "cluster") |
x_col |
X-axis variable (if NULL, uses first numeric column) |
y_col |
Y-axis variable (if NULL, uses second numeric column) |
centers |
Optional data frame of cluster centers |
title |
Plot title |
color_noise_black |
If TRUE, color noise points (cluster 0) black |
A ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.