type_abline: Add straight lines to a plot

View source: R/type_abline.R

type_ablineR Documentation

Add straight lines to a plot

Description

Add straight lines to a plot

Usage

type_abline(a = 0, b = 1)

Arguments

a, b

the intercept and slope, single values.

Examples

mod = lm(mpg ~ hp, data = mtcars)
y = mtcars$mpg
yhat = predict(mod)
tinyplot(y, yhat, xlim = c(0, 40), ylim = c(0, 40))
tinyplot_add(type = type_abline(a = 0, b = 1))

tinyplot documentation built on April 12, 2025, 9:15 a.m.