Skip to content

Instantly share code, notes, and snippets.

@MitchellAcoustics
MitchellAcoustics / 000_geom_bag.r
Created December 11, 2024 19:49 — forked from benmarwick/000_geom_bag.r
Basic bagplot geom for ggplot2
#' Bagplot
#'
#' The bag geom is useful for graphical summaries of scatterplots. It
#' is effective at showing the location, spread, skewness, and
#' outliers of a data set.
#'
#' A bagplot is a bivariate generalization of the well known boxplot. It
#' was proposed by Rousseeuw, Ruts, and Tukey. This geom plots bagplots that
#' are very similar to the one described in Rousseeuw et al. and
#' uses code from their bagplot functions in the aplpack pacakge.