
Compare Mean Results with Boxplots
plot_boxplot.RdEach colored point is one selected column's mean across spots. Each box summarizes these means within a group, not variation across spots or a confidence interval. Its center line is the median of the column means.
Usage
plot_boxplot(
spe,
column,
groups,
sources,
title = NULL,
xlab = NULL,
ylab = "Mean value",
colors = NULL,
point_size = 3
)Arguments
- spe
A
SpatialExperiment.- column
Names of numeric
colDatacolumns to compare.- groups
Named character vector mapping column names to groups on the x-axis (e.g. cell types). Order follows first appearance in
column.- sources
Named character vector mapping column names to sources shown by point color (e.g. methods). Each group/source pair must be unique.
- title, xlab
Optional plot title and x-axis label.
- ylab
Y-axis label, default "Mean value".
- colors
Optional named character vector mapping sources to colors.
- point_size
Size of the points in the plot and legend, in ggplot2 size units.