type_abline | R Documentation |
Add straight lines to a plot
type_abline(a = 0, b = 1)
a , b |
the intercept and slope, single values. |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.