tests/testthat/helper-combine-plots.R

# shared fixtures for test-combine-plots.R

iris_species_plot <- function(species) {
  ggplot(
    data = subset(datasets::iris, Species == species),
    aes(x = Sepal.Length, y = Sepal.Width)
  ) +
    geom_point() +
    labs(title = species)
}

iris_plotlist <- list(
  iris_species_plot("setosa"),
  iris_species_plot("versicolor")
)

iris_annotation_args <- list(
  tag_levels = "a",
  title = "Dataset: Iris Flower dataset",
  subtitle = "Edgar Anderson collected this data",
  caption = "Note: Only two species of flower are displayed"
)

Try the ggstatsplot package in your browser

Any scripts or data that you put into this service are public.

ggstatsplot documentation built on Oct. 18, 2026, 1:07 a.m.