Skip to contents

Plot Calibrated Radiocarbon Ages

Usage

# S4 method for class 'CalibratedAges,missing'
plot(
  x,
  calendar = get_calendar(),
  density = TRUE,
  interval = c("hdr", "credible", "none"),
  level = 0.954,
  fixed = TRUE,
  decreasing = TRUE,
  col.density = "grey",
  col.interval = "#77AADD",
  main = NULL,
  sub = NULL,
  axes = TRUE,
  frame.plot = FALSE,
  ann = graphics::par("ann"),
  panel.first = NULL,
  panel.last = NULL,
  ...
)

# S4 method for class 'CalibratedSPD,missing'
plot(
  x,
  calendar = get_calendar(),
  main = NULL,
  sub = NULL,
  ann = graphics::par("ann"),
  axes = TRUE,
  frame.plot = FALSE,
  panel.first = NULL,
  panel.last = NULL,
  ...
)

Arguments

x

A CalibratedAges or CalibratedSPD object.

calendar

An aion::TimeScale object specifying the target calendar (see aion::calendar()). If NULL, rata die are returned.

density

A logical scalar: should density be drawn?

interval

A character string specifying the intervals to be drawn. It must be one of "hrd" (the default), "credible" or "none". Any unambiguous substring can be given.

level

A length-one numeric vector giving the confidence level. Only used if interval is TRUE.

fixed

A logical scalar: should a fixed y scale be used? If TRUE (the default), ages are equally spaced along the y axis. If FALSE, age positions are used (see c14_calibrate()).

decreasing

A logical scalar: should the sort order be decreasing?

col.density, col.interval

A specification for the plotting colors.

main

A character string giving a main title for the plot.

sub

A character string giving a subtitle for the plot.

axes

A logical scalar: should axes be drawn on the plot?

frame.plot

A logical scalar: should a box be drawn around the plot?

ann

A logical scalar: should the default annotation (title and x and y labels) appear on the plot?

panel.first

An an expression to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids.

panel.last

An expression to be evaluated after plotting has taken place but before the axes, title and box are added.

...

Other graphical parameters may also be passed as arguments to this function.

Value

plot() is called it for its side-effects: it results in a graphic being displayed. Invisibly returns x.

See also

Author

N. Frerebeau

Examples

## Calibrate multiple dates
cal <- c14_calibrate(
  values = c(5000, 4500),
  errors = c(45, 35),
  names = c("X", "Y")
)

## Specify calendar
plot(cal, calendar = BP())


## HDR intervals (default)
plot(cal, interval = "hdr", level = 0.95)


## Credible intervals
plot(cal, interval = "credible", level = 0.95)


## No intervals
plot(cal, interval = NULL)


## Intervals only
plot(cal, density = FALSE, level = 0.68, lwd = 5)

plot(cal, density = FALSE, level = 0.95, lwd = 5)


## Change colors
plot(cal[, 1, ], col.interval = "red")