Skip to main content

Module refline

Module refline 

Source
Expand description

Reference lines: geom_hline, geom_vline, geom_abline.

Each geom draws one line per row of its layer data when the matching aesthetic column is present (yintercept, xintercept, or slope/intercept — ggplot2’s data-mapped form, which also honours per-row color / linetype / alpha and facet panels), and otherwise falls back to the constant stored in the geom. As in ggplot2:

  • xintercept / yintercept train the x / y position scale (the line is always inside the panel); slope / intercept train nothing;
  • reference lines do not inherit the plot-level mapping (inherit.aes = FALSE);
  • geom_abline lives in data space (in the scales’ transformed space for e.g. scale_x_log10), clipped to the panel.

Structs§

GeomAbline
Line y = intercept + slope · x in data space, spanning the panel and clipped to it.
GeomHline
Horizontal reference line spanning the panel width.
GeomVline
Vertical reference line spanning the panel height.