Visualize spatial cluster labels
Usage
plot_clusters(
dat_loc,
cluster,
title = "Cluster",
palette = NULL,
point_size = 1.45,
point_alpha = 1,
legend_nrow = 2,
legend_position = "bottom",
strip_text_size = 16,
legend_text_size = 12,
legend_title_size = 12,
...
)Arguments
- dat_loc
A numeric matrix of dimension \(n \times \rho\), where \(n\) is the number of observations and \(\rho = 2\) corresponds to two spatial coordinates.
- cluster
A vector of length \(n\) giving cluster labels.
- title
A character string specifying the facet title.
- palette
An optional character vector of colors. If
NULL, ggplot default discrete colors are used.- point_size
A numeric value specifying the point size.
- point_alpha
A numeric value specifying the point alpha.
- legend_nrow
An integer specifying the number of rows in the legend.
- legend_position
A character string specifying the legend position.
- strip_text_size
A numeric value specifying the facet strip text size.
- legend_text_size
A numeric value specifying the legend text size.
- legend_title_size
A numeric value specifying the legend title size.
- ...
Additional arguments passed to
ggplot2::geom_point().