12.1 Profiles

# Fig. 12.1: Polygons plot
library(StatDA)
data(ohorizon)
X=ohorizon[,"XCOO"]
Y=ohorizon[,"YCOO"]
el=log10(ohorizon[,c("Cu","Ni","Na","Sr")])
data(kola.background)

sel <- c(3,8,22, 29, 32, 35, 43, 69, 73 ,93,109,129,130,134,168,181,183,205,211,
218,237,242,276,292,297,298,345,346,352,372,373,386,408,419,427,441,446,490,
516,535,551,556,558,564,577,584,601,612,617)

x=el[sel,]
dimnames(x)[[1]]=ohorizon[sel,1]


# Polygons plot:
# true representation of x and y axis of map for plot
xwid=diff(range(X))/12e4
ywid=diff(range(Y))/12e4

pdf("fig-12-1.pdf",width=2*xwid,height=1*ywid)
par(mfrow=c(1,2),mar=c(1.5,1.5,1.5,1.5))
plot(X,Y,frame.plot=FALSE,xaxt="n",yaxt="n",xlab="",ylab="",type="n",
xlim=c(360000,max(X)))
plotbg(map.col=c("gray","gray","gray","gray"),add.plot=T)
polys(x,locations=cbind(X[sel],Y[sel]),factx=10000,facty=2.0,
key.loc=c(800000,7830000),add=T,cex=0.75,lwd=1.1)

# 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)


par(mar=c(.5,.5,.5,.5))
polys(x,ncol=8,key.loc=c(15,1),factx=0.30,facty=2.0,cex=0.75,lwd=1.1)
dev.off()