Skip to contents

Plot Calibrated Radiocarbon Ages

Usage

# S4 method for class 'CalibratedAges,missing'
plot(
  x,
  calendar = get_calendar(),
  interval = c("hdr", "credible"),
  level = 0.954,
  sort = TRUE,
  decreasing = FALSE,
  col = "grey",
  main = NULL,
  sub = NULL,
  ann = graphics::par("ann"),
  axes = TRUE,
  frame.plot = TRUE,
  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 = TRUE,
  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.

interval

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

level

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

sort

A logical scalar: should ages be arranged in chronological order?

decreasing

A logical scalar: should the sort order be decreasing?

col

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.

ann

A logical scalar: should the default annotation (title and x and y labels) appear on 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?

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.

...

Further parameters to be passed to aion::plot().

Value

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

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 = b2k(), flip = TRUE)


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


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


## No intervals
plot(cal, level = 0)