plot_boxplot_class: Boxplot per class

View source: R/graphics.R

plot_boxplot_classR Documentation

Boxplot per class

Description

Boxplots of a numeric column grouped by a class label.

Usage

plot_boxplot_class(
  data,
  class_label,
  label_x = "",
  label_y = "",
  colors = NULL
)

Arguments

data

data.frame with a grouping column and one numeric column

class_label

name of the grouping (class) column

label_x

x‑axis label

label_y

y‑axis label

colors

optional fill color for the boxes

Details

Expects a data.frame with the grouping column named in class_label and one numeric column. The function melts to long format and draws per‑group distributions.

Value

returns a ggplot2::ggplot graphic

Examples

grf <- plot_boxplot_class(iris |> dplyr::select(Sepal.Width, Species),
class_label = "Species", colors=c("red", "green", "blue"))
plot(grf)

daltoolbox documentation built on Nov. 5, 2025, 7:09 p.m.