ATM | R Documentation |
A-T-M diagram
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,
...
)
A |
vector with (Na |
T |
vector with TiO |
M |
vector with MgO concentrations (in wt%) |
ternary |
logical. If |
plot |
logical. If |
kde |
logical. If |
decision |
logical. If |
bty |
A character string that determines the type of ‘box’
which is drawn about plots. See |
asp |
the y/x aspect ratio, see |
xpd |
clip the plot region? See |
bw |
the smoothing bandwidth to be used for the kernel density
estimate. See |
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 |
ylim |
the y axis limits of the plot (see |
... |
additional arguments for the generic |
the Bowen-Fenner indices of the samples, where positive values indicate calc-alkaline and negative numbers tholeiitic compositions (Vermeesch and Pease, 2021).
Vermeesch, P. and Pease, V. A genetic classification of the tholeiitic and calc-alkaline magma series, Geochemical Perspective Letters.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.