add_abline: Wrapper to add lines to nested loop plot

View source: R/nested_loop.R

add_ablineR Documentation

Wrapper to add lines to nested loop plot

Description

All parameters not explicitly described here are simply passed to geom_abline.

Usage

add_abline(
  p,
  slope = 0,
  intercept = 0,
  position = "bottom",
  linetype = 3,
  size = 0.5,
  colour = "black",
  alpha = 1,
  ...
)

Arguments

p

ggplot2 object, output from nested_loop_plot function.

position

Position of the geometry layer, either "bottom" or "top". By default lines are added below all other lines in the plot to not obscure them, but by setting position to "top", these lines can also be plotted above other lines.

Details

Simple wrapper for geom_abline to add lines to nested loop plot. Useful to display e.g. target values in an experimental study, e.g. zero prediction error or zero bias (when used with slope = 0 and intercept = 0).

Value

A ggplot2 object.


matherealize/looplot documentation built on Jan. 14, 2024, 2:07 a.m.