R/writelabel.R

##==============================================================================
## writelabel   : adds a label next to a plot
##==============================================================================

writelabel <- function (text=NULL, nr=1, at=-0.1, line=1, cex=1.5, ...) {

  if (is.null(text))
    text <- LETTERS[nr]

  ## scale factors
  usr    <- par("usr")
  xmin   <- usr[1]
  xmax   <- usr[2]
  xrange <- xmax-xmin
  pos    <- xmin  + at * xrange

  mtext ( text=text, at=pos, line=line, cex=cex, ...)

}

Try the shape package in your browser

Any scripts or data that you put into this service are public.

shape documentation built on May 4, 2021, 3 p.m.