Skip to contents

GeomCutoff draws a cutoff at each supplied xintercept. The statistical position is transformed by the active coordinate system, while height is measured as a fraction of the panel. The result is a short stem that starts at the distribution baseline and follows ggplot2::coord_flip() without changing the orthogonal scale. Optional label, side, and call_id aesthetics let a teaching helper add measured callouts without training the count axis. When the x scale is positioned at the top, the stem starts at that panel edge and points inward instead.

Usage

GeomCutoff

geom_cutoff(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  ...,
  height = 0.2,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

Format

GeomCutoff is a ggplot2::Geom object.

Arguments

mapping

Set of aesthetic mappings created by ggplot2::aes().

data

The data to be displayed in this layer.

stat

The statistical transformation to use. Defaults to "identity".

position

A position adjustment. Defaults to "identity".

...

Other arguments passed to ggplot2::layer().

height

Stem height as a fraction of the panel, from 0 to 1.

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

show.legend

Logical. Should this layer be included in legends?

inherit.aes

If FALSE, override the default aesthetics rather than combining with them.

Value

geom_cutoff() returns a ggplot2 layer.

Details

geom_cutoff() is the conventional layer constructor. It does not compute cutoffs. show_cutoffs() supplies the optional marker and callout metadata after it computes one whole-distribution plan.