Skip to contents

Takes a patchwork object as input produced with MapFeatures or MapLabels and moves the legends to the right side.

Usage

ModifyPatchworkTitles(p, titles)

Arguments

p

A patchwork object

titles

A character vector matching the number of patches in p

Value

A patchwork object

Examples

library(semla)

se_mbrain <- readRDS(system.file("extdata/mousebrain", 
                                 "se_mbrain", 
                                 package = "semla"))
                                 
# With MapFeatures
p <- MapFeatures(se_mbrain, c("nFeature_Spatial", "nCount_Spatial"))
ModifyPatchworkTitles(p, titles = c("First", "Second"))


# With MapLabels
p <- MapLabels(se_mbrain, c("sample_id"))
ModifyPatchworkTitles(p, titles = "My title")