plot_distance_boxplot {STDistance} | R Documentation |
Visualize Nearest Neighbor Distances with Boxplot and Mean ± SEM
Description
Creates a boxplot visualization of distance metrics with overlaid mean points and SEM error bars. Suitable for comparing multiple groups with potentially skewed distributions.
Usage
plot_distance_boxplot(
distance_result,
id_col = "barcode",
show_points = FALSE,
y_scale = c("original", "log10"),
palette = "Set2"
)
Arguments
distance_result |
A data.frame generated by |
id_col |
Name of the column containing cell IDs (default: "barcode"). |
show_points |
Logical, whether to overlay individual data points (default: FALSE). |
y_scale |
Method for y-axis scaling: "original" or "log10" (default: "original"). |
palette |
Color palette name from |
Value
A ggplot2 object. Additional customization can be done using ggplot2 functions.
Examples
plot_distance_boxplot(distance_results,id_col = "Newbarcode")
[Package STDistance version 0.6.6 Index]