R/xyline.R

Defines functions xyline

Documented in xyline

#' Adds the y = x plot to a figure currently in device
#'
#' @return NULL
#' @author N. F. Grinberg, \email{ng414@medschl.cam.ac.uk}
#' @export
#'
#' @examples
#' plot(rnorm(100), rnorm(100))
#' xyline()
#'
xyline <- function(){
  if(dev.cur() == 1) stop('No figure!')
  abline(0, 1, lty = 2, col = 'firebrick1')
}
stas-g/funfun documentation built on July 18, 2019, 12:58 p.m.