Visualises multiple SPDs grouped as a stackCalSPD
object.
# S3 method for stackCalSPD
plot(
x,
type = "stacked",
calendar = "BP",
spdnormalised = FALSE,
rescale = FALSE,
runm = NA,
xlim = NA,
ylim = NA,
xaxt = "s",
yaxt = "s",
gapFactor = 0.2,
col.fill = NA,
col.line = NA,
lwd.obs = 1,
lty.obs = 1,
cex.lab = 1,
cex.axis = cex.lab,
legend = TRUE,
legend.arg = NULL,
ylab = NA,
ymargin = 1.1,
rnd = 2,
...
)
A stackCalSPD
class object. Result of stackspd
function.
How to display the SPDs.Current options are 'stacked'
,'lines'
, ''proportion'
. and 'multipanel'
. Default is 'stacked'
.
Either 'BP'
or 'BCAD'
. Indicate whether the calibrated date should be displayed in BP or BC/AD. Default is 'BP'
.
A logical variable indicating whether the total probability mass of the SPDs are normalised to sum to unity. Default is FALSE.
A logical variable indicating whether the summed probabilities values should be rescaled to range 0 to 1. Default is FALSE.Notice that this is different from setting spdnormalised
to TRUE.
A number indicating the window size of the moving average to smooth the SPD. If set to NA
no moving average is applied. Default is NA
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).
the y limits of the plot.
Whether the x-axis tick marks should be displayed (xaxt='s'
, default) or not (xaxt='n'
).
Whether the y-axis tick marks should be displayed (xaxt='s'
, default) or not (xaxt='n'
).
Defines spacing between SPDs as proportion of the y-axis range for multipanel plots. Default is 0.2.
Vector of fill color for the observed SPDs. The default color scheme is based on the Dark2 pallette of RColorBrewer package.
Line colour for the observed SPDs.The default color scheme is based on the Dark2 palette of RColorBrewer package.
Line width for the observed SPDs. Default is 1.
Line type for the observed SPDs. Default is 1.
The magnification to be used for x and y labels relative to the current setting of cex. Default is adjusted to 1.
The magnification to be used for axis annotation relative to the current setting of cex. Default is adjusted to 1.
Whether legend needs to be displayed. Item names will be retrieved from the values supplied in the argument group
in stackspd
. Default is TRUE.
list of additional arguments to pass to legend
; names of the list are used as argument names. Only used if legend
is set to TRUE. If supplied legend position must be given (e.g. legend.arg=list(x='bottomright')
.
a title for the y axis
multiplier for the maximum value on ylim range. Default is 1.1.
integer indicating the number of decimal places to be displayed in the y-axis for when type
is set "multitype".
Additional arguments affecting the plot.
The display order of the SPDs is given by the factor levels of the user-supplied group
argument in the stackspd()
function.
Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer.
if (FALSE) {
data(emedyd)
x = calibrate(x=emedyd$CRA, errors=emedyd$Error,normalised=FALSE)
bins = binPrep(sites=emedyd$SiteName, ages=emedyd$CRA,h=100)
res = stackspd(x=x,timeRange=c(16000,8000),bins=bins,group=emedyd$Region)
plot(res,type='stacked')
plot(res,type='lines')
plot(res,type='proportion')
plot(res,type='multipanel')
}
Run the code above in your browser using DataLab