ATM: A-T-M

View source: R/ATM.R

ATMR Documentation

A-T-M

Description

A-T-M diagram

Usage

ATM(
  A,
  T,
  M,
  ternary = TRUE,
  plot = TRUE,
  kde = TRUE,
  decision = TRUE,
  bty = "n",
  asp = 1,
  xpd = FALSE,
  bw = "nrd0",
  pch = 21,
  bg = NULL,
  dlty = 2,
  dlwd = 1.5,
  dcol = "blue",
  padding = 0.15,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

A

vector with (Na_2O+K_2O) concentrations (in wt%)

T

vector with TiO_2 concentrations

M

vector with MgO concentrations (in wt%)

ternary

logical. If FALSE, produces a logratio plot.

plot

logical. If FALSE, omits the graphical output and only returns the Bowen-Fenner indices of the sample.

kde

logical. If TRUE, adds a kernel density estimate of the Bowen-Fenner indices on a radial scale. Not used if ternary=FALSE.

decision

logical. If TRUE, adds the decision boundary between the tholeiitic and calc-alkaline magma series to the plot.

bty

A character string that determines the type of ‘box’ which is drawn about plots. See par.

asp

the y/x aspect ratio, see plot.window.

xpd

clip the plot region? See par for further details.

bw

the smoothing bandwidth to be used for the kernel density estimate. See density.

dlty

line type of the decision boundary.

dlwd

line width of the decision boundary.

dcol

colour of the decision boundary.

padding

fractional measure of distance between the data and the kernel density estimate.

xlim

the x axis limits of the plot (see plot.default for details).

ylim

the y axis limits of the plot (see plot.default for details).

...

additional arguments for the generic points function.

Value

the Bowen-Fenner indices of the samples, where positive values indicate calc-alkaline and negative numbers tholeiitic compositions (Vermeesch and Pease, 2021).

References

Vermeesch, P. and Pease, V. A genetic classification of the tholeiitic and calc-alkaline magma series, Geochemical Perspective Letters.

Examples

data(cath,package='GeoplotR')

oldpar <- par(mfrow=c(2,2),mar=c(4,4,0,0))
on.exit(par(oldpar))

A <- cath[,'Na2O']+cath[,'K2O']
T <- cath[,'TiO2']
M <- cath[,'MgO']

ATM(A,T,M,decision=FALSE,pch=21,bg='white',cex=0.5)

ATM(A,T,M,ternary=TRUE,pch=21,bw=0.2,
    padding=0.15,bg=cath[,'affinity'])

ATM(A,T,M,ternary=FALSE,decision=TRUE,kde=TRUE,
    pch=21,bw=0.2,padding=0.15,bg=cath[,'affinity'])
   
CA <- (cath$affinity=='ca')
TH <- (cath$affinity=='th')
fitCA <- ATM(A[CA],T[CA],M[CA],plot=FALSE)
fitTH <- ATM(A[TH],T[TH],M[TH],plot=FALSE)
d1 <- density(fitCA)
d2 <- density(fitTH)
matplot(cbind(d1$x,d2$x),cbind(d1$y,d2$y),
        type='l',lty=1,xlab='BF',ylab='')
legend('topleft',legend=c('Cascades','Iceland'),lty=1)


pvermees/GeoplotR documentation built on Aug. 20, 2024, 4:45 a.m.