plotSpots {ggspavis} | R Documentation |
Plotting functions for spatially resolved transcriptomics data.
plotSpots( spe, x_coord = "x", y_coord = "y", in_tissue = "in_tissue", annotate = NULL, palette = "libd_layer_colors", y_reverse = TRUE, size = 0.3 )
spe |
(SpatialExperiment) Input data, assumed to be a
|
x_coord |
(character) Name of column in |
y_coord |
(character) Name of column in |
in_tissue |
(character) Name of column in |
annotate |
(character) Name of column in |
palette |
(character) Color palette for annotation. Options for discrete
labels (e.g. cluster labels) are "libd_layer_colors", "Okabe-Ito", or a
vector of color names or hex values. For continuous values (e.g. total UMI
counts), provide a vector of length 2 for the low and high range, e.g.
|
y_reverse |
(logical) Whether to reverse y coordinates, which is often required for 10x Genomics Visium data. Default = TRUE. |
size |
(numeric) Point size for |
Function to plot spot-based spatially resolved transcriptomics data stored in
a SpatialExperiment
object.
This function generates a plot in spatial coordinates (e.g. x-y coordinates on a tissue slide), along with annotation such as cluster labels or total UMI counts.
Returns a ggplot object. Additional plot elements can be added as ggplot elements (e.g. title, labels, formatting, etc).
library(STexampleData) spe <- Visium_humanDLPFC() plotSpots(spe, annotate = "ground_truth")