Plot contour lines.
Usage
plotContour(
spe,
coi,
overlay = c("cell", "density"),
id = "cell_type",
sub.level = NULL,
...
)
Arguments
- spe
A SpatialExperiment object.
- coi
A character vector of length 1 of the cell type of interest.
- overlay
Character vector. Either plot overlay on density or cell. By default is cell.
- id
A character. The name of the column of colData(spe) containing the cell type identifiers. Set to cell_type by default.
- sub.level
Character vector. Subset on specific level.
- ...
Aesthetic mappings to pass to
ggplot2::aes_string()
.
Examples
data("xenium_bc_spe")
spe <- gridDensity(spe)
coi <- "Breast cancer"
spe <- getContour(spe, coi = coi)
#> Using bins = 10 to draw contours.
plotContour(spe, coi = coi, size = 0.3, alpha = 0.2)