Plot the age-depth model of a core.
agedepth(
set = get("info"),
BCAD = set$BCAD,
depth.unit = set$depth.unit,
age.unit = "yr",
unit = depth.unit,
d.lab = c(),
age.lab = c(),
yr.lab = age.lab,
kcal = FALSE,
acc.lab = c(),
mem.lab = c(),
d.min = c(),
d.max = c(),
d.by = c(),
depths = set$depths,
depths.file = FALSE,
accordion = c(),
plotatthesedepths = c(),
age.min = c(),
yr.min = age.min,
age.max = c(),
yr.max = age.max,
hiatus.option = 1,
dark = c(),
prob = set$prob,
rounded = c(),
d.res = 400,
age.res = 400,
yr.res = age.res,
date.res = 100,
rotate.axes = FALSE,
rev.age = FALSE,
rev.yr = rev.age,
rev.d = FALSE,
maxcalc = 500,
height = 1,
calheight = 1,
mirror = TRUE,
up = TRUE,
cutoff = 0.1,
plot.range = TRUE,
range.col = grey(0.5),
range.lty = "12",
range.lwd = 1,
mn.col = "red",
mn.lty = "12",
mn.lwd = 1,
med.col = NA,
med.lty = "12",
med.lwd = 1,
C14.col = rgb(0, 0, 1, 0.35),
C14.border = rgb(0, 0, 1, 0.5),
cal.col = rgb(0, 0.5, 0.5, 0.35),
cal.border = rgb(0, 0.5, 0.5, 0.5),
dates.col = c(),
pb.background = 0.5,
pbmodelled.col = function(x) rgb(0, 0, 1, 0.5 * x),
pbmeasured.col = "blue",
pb.lim = c(),
supp.col = rgb(0.5, 0, 0.5, 0.5),
remove.tail = TRUE,
MCMC.resample = TRUE,
hiatus.col = grey(0.5),
hiatus.lty = "12",
rgb.scale = c(0, 0, 0),
rgb.res = 100,
slump.col = grey(0.8),
normalise.dists = TRUE,
same.heights = FALSE,
cc = set$cc,
title = set$core,
title.location = "topleft",
title.size = 1.5,
plot.labels = FALSE,
labels = c(),
label.age = 1,
label.size = 0.8,
label.col = "black",
label.offset = c(0, 0),
label.adj = c(0.5, 0),
label.rot = 0,
after = set$after,
bty = "l",
mar.left = c(3, 3, 1, 0.5),
mar.middle = c(3, 0, 1, 0.5),
mar.right = c(3, 0, 1, 0.5),
mar.main = c(3, 3, 1, 1),
righthand = 3,
mgp = c(1.7, 0.7, 0),
xaxs = "r",
yaxs = "i",
MCMC.col = grey(0.4),
post.col = grey(0.8),
post.border = grey(0.4),
prior.col = 3,
prior.lwd = 2,
prior.fontcol = 2,
prior.ticks = "n",
prior.fontsize = 0.9,
toppanel.fontsize = 0.9,
mainpanel.tickfontsize = 1,
mainpanel.labelfontsize = 1,
acc.xlim = c(),
acc.ylim = c(),
mem.xlim = c(),
mem.ylim = c(),
hiatus.xlim = c(),
hiatus.ylim = c(),
phi.xlim = c(),
phi.ylim = c(),
supp.xlim = c(),
supp.ylim = c(),
xaxt = "s",
yaxt = "s",
plot.pb = TRUE,
pb.lty = 1,
plot.pdf = FALSE,
dates.only = FALSE,
model.only = FALSE,
verbose = TRUE,
save.info = TRUE
)
A plot of the age-depth model, and estimated ages incl. confidence ranges for each depth.
Detailed information of the current run, stored within this session's memory as variable info
.
The calendar scale of graphs and age output-files is in cal BP
by default, but can be changed to BC/AD using BCAD=TRUE
.
Units of the depths. Defaults to the one provided in the Bacon() command, depth.unit=set$depth.unit
.
Units of the ages. Defaults to age.unit="yr"
.
Deprecated and replaced by depth.unit
.
The labels for the depth axis. Default d.lab="Depth (cm)"
. See also depth.unit
.
The labels for the calendar axis (default age.lab="cal BP"
or "BC/AD"
if BCAD=TRUE
).
Deprecated - use age.lab instead
Use kcal BP. Default is kcal=FALSE
.
The labels for the accumulation rate plot (top middle). Default d.lab="Acc. rate (yr/cm)"
(or whatever units you're using).
The labels for the memory plot (top right). Default d.lab="Memory"
.
Minimum depth of age-depth model (use this to extrapolate to depths higher than the top dated depth).
Maximum depth of age-depth model (use this to extrapolate to depths below the bottom dated depth).
Depth intervals at which ages are calculated. Default 1. Alternative depth intervals can be provided using, e.g., d.d.by=0.5
.
By default, Bacon will calculate the ages for the depths d.min
to d.max
in steps of d.by
. Alternative depths can be provided as, e.g., depths=seq(0, 100, length=500)
or as a file, e.g., depths=read.table("CoreDepths.txt"
. See also depths.file
.
By default, Bacon will calculate the ages for the depths d.min
to d.max
in steps of d.by
.
If depths.file=TRUE
, Bacon will read a file containing the depths for which you require ages.
This file, containing the depths in a single column without a header, should be stored within coredir
,
and its name should start with the core's name and end with '_depths.txt'. Then specify depths.file=TRUE
(default FALSE
). See also depths
.
An experimental option to squeeze and stretch depths below a boundary. Needs 2 parameters: boundary depth and compression ratio, e.g., accordion=c(25,20)
. Defaults to inactive, accordion=c()
.
An option to plot ages at different depths (e.g., if a core has been compressed during a run). Use with extreme caution!
Minimum age of the age-depth plot.
Deprecated - use age.min instead.
Maximum age of the age-depth plot.
Deprecated - use age.min instead.
How to calculate accumulation rates and ages for sections with hiatuses. Either extrapolate from surrounding sections (default, hiatus.option=1
), use a w-weighted mix between the prior and posterior values for depths below the hiatus and prior information only for above the hiatus (hiatus.option=2
), or use the originally calculated slopes (hiatus.option=0
).
Darkness of the greyscale age-depth model. By default, the darkest grey value is calculated as 10 times the height of the lowest-precision age estimate dark=c()
. Lower values will result in lighter grey but values >1 are not allowed.
Confidence interval to report (between 0 and 1, default 0.95 or 95%).
Rounding of years. Default is to round to single years (1 digit for plum models).
Resolution or amount of greyscale pixels to cover the depth scale of the age-model plot. Default d.res=200
.
Resolution or amount of greyscale pixels to cover the age scale of the age-model plot. Default yr.res=200
.
Deprecated - use age.res instead.
Date distributions are plotted using date.res=100
points by default.
By default, the age-depth model is plotted with the depths on the horizontal axis and ages on the vertical axis. This can be changed with rotate.axes=TRUE
.
The direction of the age axis, which can be reversed using rev.age=TRUE
.
Deprecated - use rev.age instead.
The direction of the depth axis, which can be reversed using rev.d=TRUE
.
Number of depths to calculate ages for. If this is more than maxcalc=500
, a warning will be shown that calculations will take time.
The maximum heights of the distributions of the dates on the plot. See also normalise.dists
.
Multiplier for the heights of the distributions of dates on the calendar scale. Defaults to calheight=1
.
Plot the dates as 'blobs'. Set to mirror=FALSE
to plot simple distributions.
Directions of distributions if they are plotted non-mirrored. Default up=TRUE
.
Avoid plotting very low probabilities of date distributions (default cutoff=0.1
).
Whether or not to plot the curves showing the confidence ranges of the age-model. Defaults to (plot.range=TRUE
).
The colour of the curves showing the confidence ranges of the age-model. Defaults to medium grey (range.col=grey(0.5)
).
The line type of the curves showing the confidence ranges of the age-model. Defaults to range.lty=12
.
Widths of the lines of the ranges of the age-depth model. Default range.lwd=1
.
The colour of the mean age-depth model: default mn.col="red"
.
The line type of the mean age-depth model. Default mn.lty=12
.
Width of the line of the mean age-depth model. Default mn.lwd=1
.
The colour of the median age-depth model: not drawn by default med.col=NA
.
The line type of the median age-depth model. Default med.lty=12
.
Width of the line of the median age-depth model. Default med.lwd=1
.
The colour of the calibrated ranges of the dates. Default is semi-transparent blue: C14.col=rgb(0,0,1,.35)
.
The colours of the borders of calibrated 14C dates. Default is semi-transparent dark blue: C14.border=rgb(0, 0, 1, 0.5)
.
The colour of the non-14C dates. Default is semi-transparent blue-green: cal.col=rgb(0,.5,.5,.35)
.
The colour of the border of non-14C dates in the age-depth plot: default semi-transparent dark blue-green: cal.border=rgb(0,.5,.5,.5)
. Not used by default.
As an alternative to colouring dates based on whether they are 14C or not, sets of dates can be coloured as, e.g., dates.col=colours()[2:100]
.
Probability at which total Pb values are considered to have reached background values, or in other words, that their modelled values are at or below supported + detection limit (Al)). Setting this at 0.5 means that any depth with a Pb measurement, where at least half of the iterations model Pb values reaching background values, is flagged as having reached background. The age-model is not extended to any Pb measurements that have reached background.
Colour of the modelled 210Pb values. Defaults to shades of blue: pbmodelled.col=function(x) rgb(0,0,1,x)
.
Colour of the measured 210Pb values (default pbmeasured.col="blue"
). Draws rectangles of the upper and lower depths as well as the Pb values with 95 percent error ranges.
Axis limits for the Pb-210 data. Calculated automatically by default (pblim=c()
).
Colour of supported Pb-210. Defaults to semi-transparent purple, because why not.
Whether or not to remove the tail measurements when plotting. Sometimes automated removal might go wrong, so then this option can be used to avoid removing the tail measurements.
After the MCMC run, if there are more MCMC iterations than requested, only the last 'ssize' iterations will be retained. Defaults to TRUE.
The colour of the depths of any hiatuses. Default hiatus.col=grey(0.5)
.
The line type of the depths of any hiatuses. Default hiatus.lty=12
.
The function to produce a coloured representation of all age-models. Needs 3 values for the intensity of red, green and blue. Defaults to grey-scales: rgb.scale=c(0,0,0)
, but could also be, say, scales of red (rgb.scale=c(1,0,0)
).
Resolution of the colour spectrum depicting the age-depth model. Default rgb.res=100
.
Colour of slumps. Defaults to slump.col=grey(0.8)
.
By default, the distributions of more precise dates will cover less time and will thus peak higher than less precise dates. This can be avoided by specifying normalise.dists=FALSE
.
Plot the distributions of the dates all at the same maximum height (default same.height=FALSE
).
Calibration curve for 14C dates: cc=1
for IntCal20 (northern hemisphere terrestrial), cc=2
for Marine20 (marine), cc=3
for SHCal20 (southern hemisphere terrestrial). For dates that are already on the cal BP scale use cc=0
.
The title of the age-depth model is plotted on the main panel. By default this is the core's name. To leave empty: title=""
.
Location of the title. Default title.location='topleft'
.
Size of the title font. Defaults to title.size=1.5
.
Whether or not to plot labels next to the dated depths. Defaults to FALSE
.
Add labels to the dates (as given by the first column of the .csv file). FALSE
by default.
Position on the age axis of the date labels. By default draws them before the youngest age (1), but can also draw them after the oldest age (2), or above its mean (3).
Size of labels.
Colour of the labels. Defaults to the colour given to the borders of the dates.
Offsets of the positions of the labels, giving the x and y offsets. Defaults to c(0,0).
Justification of the labels. Follows R's adj option: A value of ‘0’ produces left-justified text, ‘0.5’ (the default) centered text and ‘1’ right-justified text.
Rotation of the label. 0 by default (horizontal).
Sets a short section above and below hiatus.depths within which to calculate ages. For internal calculations - do not change.
Type of box to be drawn around plots ("n"
for none, and "l"
(default), "7"
, "c"
, "u"
, or "o"
for correspondingly shaped boxes).
Plot margins for the topleft panel (amount of white space along edges of axes 1-4). Default mar.left=c(3,3,1,1)
.
Plot margins for the middle panel(s) at the top (amount of white space along edges of axes 1-4). Default mar.middle=c(3,3,1,1)
.
Plot margins for the topright panel (amount of white space along edges of axes 1-4). Default mar.right=c(3,3,1,1)
.
Plot margins for the main panel (amount of white space along edges of axes 1-4). Default mar.main=c(3,3,1,1)
.
Adapt the righthand margins by a certain amount (default 2) to allow a righthand axis to be plotted (for plum)
Axis text margins (where should titles, labels and tick marks be plotted). Defaults to mgp=c(1.7, 0.7, 0.0)
.
Extension of x-axis. By default, add some extra white-space at both extremes (xaxs="r"
). See ?par for other options.
Extension of y-axis. By default, add no extra white-space at both extremes (yaxs="i"
). See ?par for other options.
Colour of the MCMC output. Defaults to post.col=grey(0.4))
.
Colour of the posterior histogram. Defaults to post.col=grey(0.8))
.
Colour of the posterior border. Defaults to post.border=grey(0.4))
.
Colour of the prior curve. Defaults to light green, prior.col=3)
.
Line width of the prior curve. Defaults to prior.lwd=2)
.
Colour of the font accompanying the posterior histograms. Defaults to red, prior.fontcol=2)
.
Plot tickmarks and values on the vertical axes for the prior and posterior distributions. Defaults to no tick marks (prior.ticks="n"
). Set to prior.ticks="s"
to plot the tick marks. Note that these values are of little practical use, as they correspond poorly to, e.g., the mean and strength values. All that matters is that the areas of both the prior and the posterior distributions sum to 1; wider distributions tend to give lower peaks, and narrower distributions higher peaks.
Font size of the prior, relative to R's standard size. Defaults to prior.fontsize=0.9
.
Font size of the top panels, relative to R's standard size. Defaults to prior.fontsize=0.9
.
Font size of values at the tick marks in the main panel, relative to R's standard size. Defaults to mainpanel.tickfontsize=1
.
Font size of axis labels in the main panel, relative to R's standard size. Defaults to mainpanel.labelsize=1
.
Horizontal axis limits of the accumulation rate panel. Calculated automatically by default.
Vertical axis limits of the accumulation rate panel. Calculated automatically by default.
Horizontal axis limits of the memory panel. Calculated automatically by default.
Vertical axis limits of the memory panel. Calculated automatically by default.
Horizontal axis limits of the hiatus size panel. Calculated automatically by default.
Vertical axis limits of the hiatus size panel. Calculated automatically by default.
Horizontal axis limits of the phi panel. Calculated automatically by default.
Vertical axis limits of the phi panel. Calculated automatically by default.
Horizontal axis limits of the supported-Pb panel. Calculated automatically by default.
Vertical axis limits of the supported-Pb panel. Calculated automatically by default.
Whether or not to plot the x-axis. Can be used to adapt axes after a plot. See ?par for other options.
Whether or not to plot the y-axis. Can be used to adapt axes after a plot. See ?par for other options.
Plot the 210Pb data (if present). Defaults to plot.pb=TRUE
.
Line type of measured Pb-210 data.
Produce a pdf file of the age-depth plot.
By default, the age-depth model is plotted on top of the dates. This can be avoided by supplying dates.only=TRUE
.
By default, panels showing the MCMC iterations and the priors and posteriors for accumulation rate and memory are plotted above the main age-depth model panel. This can be avoided by supplying model.only=TRUE
. Note however that this removes relevant information to evaluate the age-depth model, so we do recommend to present age-models together with these upper panels.
Provide a summary of the age ranges after producing the age-depth model graph; default verbose=FALSE
.
By default, a variable called `info' with relevant information about the run (e.g., core name, priors, settings, ages, output) is saved into the working directory. Note that this will overwrite any existing variable with the same name - as an alternative, one could run, e.g., myvar <- Bacon()
, followed by supplying the variable myvar
in any subsequent commands.
Maarten Blaauw, J. Andres Christen
After loading a previous run, or after running either the scissors or thinner command, plot the age-model
again using the command agedepth()
.
# \donttest{
Bacon(ask=FALSE, coredir=tempfile())
agedepth()
# }
Run the code above in your browser using DataLab