View source: R/Plotting_Seurat.R
SpatialDimPlot_scCustom | R Documentation |
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 |
Seurat object name. |
group.by |
Name of meta.data column to group the data by |
images |
Name of the images to use in the plot(s) |
colors_use |
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 |
crop |
Crop the plot in to focus on points plotted. Set to |
label |
Whether to label the clusters |
label.size |
Sets the size of the labels |
label.color |
Sets the color of the label text |
label.box |
Whether to put a box around the label text (geom_text vs geom_label) |
repel |
Repels the labels to prevent overlap |
ncol |
Number of columns if plotting multiple plots |
pt.size.factor |
Scale the size of the spots. |
alpha |
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. |
image.alpha |
Adjust the opacity of the background images. Set to 0 to remove. |
stroke |
Control the width of the border around the spots |
interactive |
Launch an interactive SpatialDimPlot or SpatialFeaturePlot
session, see |
combine |
Combine plots into a single gg object; note that if TRUE; themeing will not work when plotting multiple features/groupings |
ggplot_default_colors |
logical. If |
color_seed |
random seed for the "varibow" palette shuffle if |
... |
Extra parameters passed to |
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).
## Not run:
SpatialDimPlot_scCustom(seurat_object = seurat_object)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.