#' Add grid to a plot
#'
#'
#' Add grid to a plot using \code{\link{abline}}.
#'
#'
#' @param at.x x axis grid values
#' @param at.y y axis grid values
#' @param col grid color
#' @param lty line type
#' @param lwd line width
#' @return The function adds a grid to a plot using \code{\link{abline}}.
#' @export
addGrid <- function(at.x, at.y = at.x,
col = "lightgray",
lty = "dotted",
lwd = par("lwd")) {
abline(v = at.x, col = col, lty = lty, lwd = lwd)
abline(h = at.y, col = col, lty = lty, lwd = lwd)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.