R/Plotting_Seurat.R
SpatialDimPlot_scCustom.Rd
Creates SpatialDimPlot with some of the settings modified from their Seurat defaults (colors_use).
SpatialDimPlot_scCustom(
seurat_object,
group.by = NULL,
images = NULL,
colors_use = NULL,
crop = TRUE,
label = FALSE,
label.size = 7,
label.color = "white",
label.box = TRUE,
repel = FALSE,
ncol = NULL,
pt.size.factor = 1.6,
alpha = c(1, 1),
image.alpha = 1,
stroke = 0.25,
interactive = FALSE,
combine = TRUE,
ggplot_default_colors = FALSE,
color_seed = 123,
...
)
Seurat object name.
Name of meta.data column to group the data by
Name of the images to use in the plot(s)
color palette to use for plotting. By default if number of levels plotted is less than
or equal to 36 it will use "polychrome" and if greater than 36 will use "varibow" with shuffle = TRUE
both from DiscretePalette_scCustomize
.
Crop the plot in to focus on points plotted. Set to FALSE
to show
entire background image.
Whether to label the clusters
Sets the size of the labels
Sets the color of the label text
Whether to put a box around the label text (geom_text vs geom_label)
Repels the labels to prevent overlap
Number of columns if plotting multiple plots
Scale the size of the spots.
Controls opacity of spots. Provide as a vector specifying the min and max for SpatialFeaturePlot. For SpatialDimPlot, provide a single alpha value for each plot.
Adjust the opacity of the background images. Set to 0 to remove.
Control the width of the border around the spots
Launch an interactive SpatialDimPlot or SpatialFeaturePlot
session, see ISpatialDimPlot
or
ISpatialFeaturePlot
for more details
Combine plots into a single gg object; note that if TRUE; themeing will not work when plotting multiple features/groupings
logical. If colors_use = NULL
, Whether or not to return plot using
default ggplot2 "hue" palette instead of default "polychrome" or "varibow" palettes.
random seed for the "varibow" palette shuffle if colors_use = NULL
and number of
groups plotted is greater than 36. Default = 123.
Extra parameters passed to DimPlot
.
A ggplot object
Many of the param names and descriptions are from Seurat to facilitate ease of use as this is simply a wrapper to alter some of the default parameters https://github.com/satijalab/seurat/blob/master/R/visualization.R (License: GPL-3).
if (FALSE) {
SpatialDimPlot_scCustom(seurat_object = seurat_object)
}