margin_letter: Function to draw a letter in a figure angle, after having...

View source: R/margin_letter.R

margin_letterR Documentation

Function to draw a letter in a figure angle, after having plotted the figure

Description

Useful for multi-graph figures (eg with mfrow)

Usage

margin_letter(
  l = NULL,
  pos = c("topleft", "topright", "bottomleft", "bottomright", "coords"),
  cex = par("cex") * 2,
  xdr = 1/10,
  ydr = 1/10,
  coords = c(0, 0),
  ...
)

Arguments

l

text

pos

location of the letter, use 'coords' for custom non automatic placement

cex

cex parameter

xdr

distance from the angle (x coordinates) as percentage of x range

ydr

distance from the angle (y coordinates) as percentage of x range

coords

c(x, y) vector of coordinates

...

further parameters passed to

Examples

plot(rnorm(100))
margin_letter("A", "topleft")
margin_letter("B", "topright", xdr = 1/50) ## decrease distance from the angle, otherwise it's printed out of screen
margin_letter("C", "bottomleft")
margin_letter("D", "bottomright", xdr = 1/50)

lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.