multiplot: Plot multiple dates

View source: R/plots.R

multiplotR Documentation

Plot multiple dates

Description

Plot multiple radiocarbon dates.

Usage

multiplot(
  x,
  type = "d",
  calendar = "BP",
  HPD = FALSE,
  credMass = 0.95,
  decreasing = NULL,
  label = TRUE,
  label.pos = 0.5,
  label.offset = 0,
  xlim = NULL,
  xlab = NA,
  ylab = NA,
  col.fill = "grey50",
  col.fill2 = "grey82",
  col.line = "black",
  lwd = 1,
  cex.id = 1,
  cex.lab = 1,
  cex.axis = 1,
  ydisp = FALSE,
  gapFactor = 0.2,
  rescale = FALSE
)

Arguments

x

A CalDates class object with length > 1.

type

Whether the calibrated dates are displayed as distributions ('d') or as horizontal bars ('b') spanning the HPD interval. Default is 'd'.

calendar

Either 'BP' or 'BCAD'. Indicate whether the calibrated date should be displayed in BP or BC/AD. Default is 'BP'.

HPD

Logical value indicating whether intervals of higher posterior density should be displayed. Default is FALSE.

credMass

A numerical value indicating the size of the higher posterior density interval. Default is 0.95.

decreasing

Whether dates should be plotted with decreasing order of median calibrated date (i.e. old to new; TRUE) or increasing order (i.e. new to old; FALSE). If set to NULL the dates plotted in the supplied order. Default is NULL

label

Whether the ID of each date should be displayed. Default is TRUE.

label.pos

Relative position of the label in relation to the calibrated distribution expressed in quantiles. Default is 0.5 (median).

label.offset

Horrizontal offset of label position in number of years. Default is 0.

xlim

the x limits of the plot. In BP or in BC/AD depending on the choice of the parameter calender. Notice that if BC/AD is selected BC ages should have a minus sign (e.g. c(-5000,200) for 5000 BC to 200 AD).

xlab

(optional) Label for the x axis. If unspecified the default setting will be applied ("Year BP" or "Year BC/AD").

ylab

(optional) Label for the y axis.

col.fill

A vector of primary fill color for the calibrated date distribution. Default is 'grey50'.

col.fill2

A vector of secondary secondary colour fill color for the calibrated date distribution, used for regions outside the higher posterior interval. Ignored when HPD=FALSE. Default is 'grey82'.

col.line

A vector of line color (ignored when type is set to 'd'. Default is 1.

lwd

Line width (ignored when type is set to 'd'). Default is 1.

cex.id

The magnification to be used the date labels relative to the current setting of cex. Default is adjusted to 1.

cex.lab

The magnification to be used for x and y labels relative to the current setting of cex. Default is adjusted to 1.

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex. Default is adjusted to 1.

ydisp

Whether the y axis should be displayed. Ignored when type is set to 'b'. Default is FALSE

gapFactor

Defines spacing between calibrated dates (when type is set to 'd') or the distance between the lines and the labels (when type is set to 'b') as proportion of individual y-axis ranges. Default is 0.2.

rescale

Whether probability distributions should be rescaled (applicable only when type is set to 'd', default is FALSE).

See Also

calibrate

Examples

data("emedyd")
tellaswad = subset(emedyd,SiteName=='Tell Aswad')
x = calibrate(tellaswad$CRA,tellaswad$Error,ids=tellaswad$LabID)
multiplot(x,HPD=TRUE,decreasing=TRUE,label=FALSE,gapFactor = 0.1)
multiplot(x,type='b',calendar='BCAD',cex.id = 0.5,lwd=2,gapFactor = 0.5)

rcarbon documentation built on Aug. 24, 2023, 5:11 p.m.