Description Usage Arguments Details Examples
View source: R/convenience_funcs.R
add_title_ggplot
adds a title to a ggplot object using cowplot.
1 | add_title_ggplot(ggplot_obj, plot_title)
|
ggplot_obj |
A ggplot object. |
plot_title |
A character value for the plot title. |
This is useful when the ggplot object aleady has a title (e.g. gene ID) or if it is a faceted plot (e.g. UMAP split by 'orig.ident').
1 2 3 4 5 | # load example dataset from Seurat
data("pbmc_small", package="Seurat")
add_title_ggplot(Seurat::DimPlot(pbmc_small, group.by = "RNA_snn_res.0.8", split.by = "groups"),
paste0("n=",(length(Seurat::Idents(pbmc_small)))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.