![]() |
# Fig. 13.5.: Multivariate outlier detection for moss elements, simple symbols
library(StatDA) data(moss) X=moss[,"XCOO"] Y=moss[,"YCOO"] # true representation of x and y axis of map for plot xwid=diff(range(X))/12e4 ywid=diff(range(Y))/12e4 pdf("fig-13-5.pdf",width=9,height=5) par(mfrow=c(1,2),mar=c(1.5,1.5,1.5,1.5)) el=c("Ag","As","Bi","Cd","Co","Cu","Ni") dat=log10(moss[,el]) data(kola.background) res <- plotmvoutlier(cbind(X,Y),dat,symb=F,map.col=c("grey","grey","grey","grey"), map.lwd=c(1,1,1,1), xlab="",ylab="",frame.plot=FALSE,xaxt="n",yaxt="n") legend("topright",pch=c(3,21),pt.cex=c(0.7,0.2), legend=c("outliers", "non-outliers"), cex=0.8) # scalebar scalebar(761309,7373050,861309,7363050,shifttext=-0.5,shiftkm=37e3,sizetext=0.8) # North arrow Northarrow(362602,7818750,362602,7878750,362602,7838750,Alength=0.15,Aangle=15,Alwd=1.3,Tcex=1.6) res <- plotmvoutlier(cbind(X,Y),dat,symb=T,bw=T,map.col=c("grey","grey","grey","grey"), map.lwd=c(1,1,1,1), lcex.fac=0.6, xlab="",ylab="",frame.plot=FALSE,xaxt="n",yaxt="n") perc.ypos=seq(from=77.4e5,to=78.7e5,length=6) sym.ypos=perc.ypos[-6]+diff(perc.ypos)/2 points(rep(8.2e5,5),sym.ypos,pch=c(1, 1, 16, 3, 3),cex=c(1.5, 1, 0.5, 1, 1.5)*0.6) text(rep(8.0e5,6),perc.ypos[-5],round(100*c(0,0.25,0.5,0.75,1),2),pos=2,cex=0.7) text(8.0e5,perc.ypos[5],"break",cex=0.72,pos=2) text(7.5e5,79e5,"Percentile",cex=0.8) text(8.4e5,79e5,"Symbol",cex=0.8) # scalebar scalebar(761309,7373050,861309,7363050,shifttext=-0.5,shiftkm=37e3,sizetext=0.8) # North arrow Northarrow(362602,7818750,362602,7878750,362602,7838750,Alength=0.15,Aangle=15,Alwd=1.3,Tcex=1.6) dev.off() |
![]() |
# Fig. 13.6.: Multivariate outlier detection for moss elements, univariate plot
library(StatDA) data(moss) pdf("fig-13-6.pdf",width=10,height=5) par(mfcol=c(1,1),mar=c(4,4,2,2)) el=c("Ag","As","Bi","Cd","Co","Cu","Ni") dat=log10(moss[,el]) res <- plotuniout(dat,symb=F,cex2=c(0.9,0.1),pch2=c(3,21)) mtext("+ outliers",side=1,at=-10.5,line=1.5) mtext("non-outliers",side=1,at=-5.7,line=1.5) mtext(".",side=1,at=-7.0,line=1.3,cex=2) dev.off() |