Skip to contents

Row 1 (cell density): beta0 + a11 w1 and a11 w1, on a shared color scale. Row 2 (expression): beta1 + a21 w1 + a22 w2, a21 w1 and a22 w2, on a shared color scale.

Usage

plot_denmark_fields(obj, fields = NULL, xlab = "x", ylab = "y")

Arguments

obj

A denmark object fitted with keep_fit = TRUE.

fields

Optional output of denmark_fields(); computed from obj when NULL.

xlab, ylab

Axis labels.

Value

A patchwork figure, or a list of five ggplot objects when patchwork is not installed.

Examples

toy <- denmark_toy_data()
tissue <- denmark_alpha_shape(toy$x, toy$y)
tumor <- subset(toy, celltype == "Tumor", select = -celltype)
fit <- DenMark(tumor, gene = "geneA", boundary = tissue,
               grid_size = 10, basis = 10,
               chains = 2, iter_warmup = 300, iter_sampling = 300,
               seed = 2024, quiet = TRUE)
plot_denmark_fields(fit)