Skip to contents

Plot grid-based density.

Usage

plotDensity(spe, coi = NULL, probs = 0.5)

Arguments

spe

A SpatialExperiment object.

coi

A character vector of cell types of interest (COIs) to be plotted. Default to all cell types.

probs

Numeric value between 0 and 1, used for filtering uninformative grid, default is 0.5.

Value

A ggplot object.

Examples


data("xenium_bc_spe")

spe <- gridDensity(spe)

plotDensity(spe, coi = "Breast cancer")


plotDensity(spe, coi = "Fibroblasts")