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

library("tinyplot")

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))