plot_cluster: Visualize cluster labels on locations.

View source: R/SpatialPCA_utilties.R

plot_clusterR Documentation

Visualize cluster labels on locations.

Description

This function visualizes cluster labels on locations.

Usage

plot_cluster(
  location,
  clusterlabel,
  pointsize = 3,
  text_size = 15,
  title_in,
  color_in,
  legend = "none"
)

Arguments

location

A n by k matrix of spot locations.

clusterlabel

A vector of cluster labels for spots.

pointsize

An integer, the point size of each spot.

title_in

A character string, the title you want to display at the top of the figure.

color_in

A vector of colors for each cluster.

legend

A character string, the position of the figure legend. Select from "top", "bottom","left" or "right".

textsize

An integer, the text size in the legend.

Value

A ggplot object.


shangll123/SpatialPCA documentation built on April 17, 2024, 3:15 a.m.