Learn R Programming

StratigrapheR (version 0.0.2)

nlegend: New legend element

Description

Prepares a plotting environment for a new element of a multifigure legend

Usage

nlegend(temp = FALSE, t = "Text", xt = 1.3, xmax = 5, xmin = -1.2,
  ymax = 1.5, ymin = -ymax)

Arguments

temp

whether to plot a template for visualisation

t

text to provide the legend

xt

the x position of the text

xmin, xmax, ymin, ymax

the x and y limits for the plotting area

See Also

multigons, bedtext, infobar and ylink

Examples

Run this code
# NOT RUN {
opar <- par("mar")

par(mar = c(0,0,0,0))

layout(matrix(1:6, 6, 1, byrow = TRUE))

nlegend(t = paste("Shaded stuff. By the way you can\nwrite",
                  "text in several lines if needed"))

rect(-1,-1,1,1, density = 10)

nlegend(TRUE, t = "Text: left side at x = 1.3 (default xt value)")

par(mar = opar)

# }

Run the code above in your browser using DataLab