Single Spatial Plot
SingleImagePlot(
data,
col.by = NA,
col.factor = TRUE,
cols = NULL,
shuffle.cols = FALSE,
size = 0.1,
molecules = NULL,
mols.size = 0.1,
mols.cols = NULL,
mols.alpha = 1,
alpha = molecules %iff% 0.3 %||% 0.6,
border.color = "white",
border.size = NULL,
na.value = "grey50",
dark.background = TRUE,
...
)
A ggplot object
A data frame with at least the following columns:
“x
”: Spatial-resolved x coordinates, will be
plotted on the y-axis
“y
”: Spatially-resolved y coordinates, will be
plotted on the x-axis
“cell
”: Cell name
“boundary
”: Segmentation boundary label; when plotting
multiple segmentation layers, the order of boundary transparency is set by
factor levels for this column
Can pass NA
to data
suppress segmentation visualization
Name of column in data
to color cell segmentations by;
pass NA
to suppress coloring
Are the colors a factor or discrete?
Colors for cell segmentations; can be one of the following:
NULL
for default ggplot2 colors
A numeric value or name of a color brewer palette
Name of a palette for DiscretePalette
A vector of colors equal to the length of unique levels of
data$col.by
Randomly shuffle colors when a palette or
vector of colors is provided to cols
Point size for cells when plotting centroids
A data frame with spatially-resolved molecule coordinates; should have the following columns:
“x
”: Spatial-resolved x coordinates, will be
plotted on the y-axis
“y
”: Spatially-resolved y coordinates, will be
plotted on the x-axis
“molecule
”: Molecule name
Point size for molecules
A vector of color for molecules. The "Set1" palette from RColorBrewer is used by default.
Alpha value for molecules, should be between 0 and 1
Alpha value, should be between 0 and 1; when plotting multiple
boundaries, alpha
is equivalent to max alpha
Color of cell segmentation border; pass NA
to suppress borders for segmentation-based plots
Thickness of cell segmentation borders; pass NA
to suppress borders for centroid-based plots
Color value for NA
segmentations when
using custom scale
Ignored