ggheatmap()
ggmark()
Annotation observations
By default, when no manual observations were selected, ggmark()
will select all observations and split them based on the groups defined in the layout.
set.seed(123)
ggheatmap(mat) +
anno_right() +
align_kmeans(3L) +
ggmark(mark_line()) +
geom_boxplot(aes(.names, value)) +
theme(plot.margin = margin(l = 0.1, t = 0.1, unit = "npc"))
#> → heatmap built with `geom_tile()`
Annotate a specific subset of observations:
set.seed(123)
ggheatmap(mat) +
anno_right() +
align_kmeans(3L) +
# Select and annotate rows 1–3 and 6–10 only
ggmark(mark_line(1:3, 6:10)) +
geom_boxplot(aes(.names, value)) +
theme(plot.margin = margin(l = 0.1, t = 0.1, unit = "npc"))
#> → heatmap built with `geom_tile()`