Takes bivariate data with (correlated) uncertainties as input and produces a scatter plot with error ellipses or crosses as output. (optionally) displays the linear fit on this diagram, and can show a third variable as a colour scale.
scatterplot(
xy,
oerr = 3,
show.numbers = FALSE,
show.ellipses = 1,
levels = NA,
clabel = "",
ellipse.fill = c("#00FF0080", "#FF000080"),
ellipse.stroke = "black",
fit = NULL,
add = FALSE,
empty = FALSE,
ci.col = "gray80",
line.col = "black",
lwd = 1,
hide = NULL,
omit = NULL,
omit.fill = NA,
omit.stroke = "grey",
addcolourbar = TRUE,
bg,
cex,
xlim = NULL,
ylim = NULL,
xlab,
ylab,
asp = NA,
log = "",
taxis = FALSE,
box = !taxis,
xaxt = ifelse(taxis, "n", "s"),
...
)
matrix with columns X, sX, Y, sY(, rXY)
indicates whether the analytical uncertainties of the output are reported as:
1
: 1\(\sigma\) absolute uncertainties.
2
: 2\(\sigma\) absolute uncertainties.
3
: absolute (1-\(\alpha\))% confidence intervals, where
\(\alpha\) equales the value that is stored in
settings('alpha')
.
4
: 1\(\sigma\) relative uncertainties (\(\%\)).
5
: 2\(\sigma\) relative uncertainties (\(\%\)).
6
: relative (1-\(\alpha\))% confidence intervals, where
\(\alpha\) equales the value that is stored in
settings('alpha')
.
logical flag (TRUE
to show grain
numbers)
show the data as:
0
: points
1
: error ellipses
2
: error crosses
a vector with additional values to be displayed as different background colours within the error ellipses.
label for the colour scale
Fill colour for the error ellipses. This can either be a single colour or multiple colours to form a colour ramp. Examples:
a single colour: rgb(0,1,0,0.5)
, '#FF000080'
,
'white'
, etc.;
multiple colours: c(rbg(1,0,0,0.5)
,
rgb(0,1,0,0.5))
, c('#FF000080','#00FF0080')
,
c('blue','red')
, c('blue','yellow','red')
, etc.;
a colour palette: rainbow(n=100)
,
topo.colors(n=100,alpha=0.5)
, etc.; or
a reversed palette: rev(topo.colors(n=100,alpha=0.5))
,
etc.
For empty ellipses, set ellipse.col=NA
the stroke colour for the error
ellipses. Follows the same formatting guidelines as
ellipse.fill
the output of york()
(optional).
if TRUE
, adds the points and lines to the
existing plot.
set up an empty plot with the right axis limits to fit the data
the fill colour for the confidence interval of the intercept and slope.
colour of the regression line
line width of the regression line
vector with indices of aliquots that should be removed from the plot.
vector with indices of aliquots that should be plotted but omitted from the isochron age calculation.
fill colour that should be used for the omitted aliquots.
stroke colour that should be used for the omitted aliquots.
add a colour bar to display the colours used to
levels
background colour for the plot symbols (only used if
show.ellipses=0
).
plot symbol magnification.
(optional) two-element vector with the x-axis limits
(optional) two-element vector with the y-axis limits
(optional) x-axis label (only used when
add=FALSE
)
(optional) y-axis label (only used when
add=FALSE
)
the y/x aspect ratio, see `plot.window'.
same as the eponymous argument to the generic
plot
function.
logical. If TRUE
, replaces the x-axis of an
inverse isochron with a time scale. Only used if
inverse=TRUE
.
logical. If TRUE
, draws a frame around the plot.
see ?par
optional arguments to format the points and text.
X <- c(1.550,12.395,20.445,20.435,20.610,24.900,
28.530,50.540,51.595,86.51,106.40,157.35)
Y <- c(.7268,.7809,.8200,.8116,.8160,.8302,
.8642,.9534,.9617,1.105,1.230,1.440)
sX <- X*0.02
sY <- Y*0.01
dat <- cbind(X,sX,Y,sY)
scatterplot(dat,fit=york(dat),show.ellipses=2)
Run the code above in your browser using DataLab