Plot Calibrated Radiocarbon Ages
c14_plot.Rd
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
orCalibratedSPD
object.- calendar
An
aion::TimeScale
object specifying the target calendar (seeaion::calendar()
). IfNULL
, 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 ifinterval
isTRUE
.- fixed
A
logical
scalar: should a fixed y scale be used? IfTRUE
(the default), ages are equally spaced along the y axis. IfFALSE
, agepositions
are used (seec14_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
Other radiocarbon tools:
F14C
,
c14_calibrate()
,
c14_combine()
,
c14_curve()
,
c14_ensemble()
,
c14_sample()
,
c14_spd()
,
c14_uncalibrate()
,
rec_plot
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")