multiplot: Plot multiple dates

Description Usage Arguments See Also Examples

View source: R/plots.R

Description

Plot multiple radiocarbon dates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
multiplot(
  x,
  type = "d",
  calendar = "BP",
  HPD = FALSE,
  credMass = 0.95,
  decreasing = NULL,
  label = TRUE,
  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.

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

1
2
3
4
5
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)

Example output

[1] "Calibrating radiocarbon ages..."

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |=====                                                                 |   6%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |==============                                                        |  19%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=======================                                               |  32%
  |                                                                            
  |=========================                                             |  35%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |=================================================================     |  94%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |======================================================================| 100%
[1] "Done."

rcarbon documentation built on Jan. 13, 2021, 7:09 p.m.