![]() |
# Fig. 5.2.: Growing dot maps: continuously and exponential growing
library(StatDA) data(chorizon) data(kola.background) el=chorizon[,"As"] X=chorizon[,"XCOO"] Y=chorizon[,"YCOO"] # true representation of x and y axis of map for plot xwid=diff(range(X))/12e4 ywid=diff(range(Y))/12e4 pdf("fig-5-2.pdf",width=2*xwid,height=1*ywid) par(mfrow=c(1,2),mar=c(1.5,1.5,1.5,1.5)) ### NEW MAP: # take symbols continuously growing q=c(min(el),min(el)+(max(el)-min(el))/2,max(el)) # symbols and size symb=c(16,16,16) ssize=c(0.3,0.9,1.7) # generate plot with packground plot(X,Y,frame.plot=FALSE,xaxt="n",yaxt="n",xlab="",ylab="",type="n") plotbg(map.col=c("gray","gray","gray","gray"),add.plot=T) # plot symbols: el01=(el-min(el))/(max(el)-min(el)) el01ssize=el01*(ssize[3]-ssize[1])+ssize[1] points(X, Y, pch=symb[3], cex=el01ssize) #Legend legn=round(q,2) leg=rep(NA,length(q)) for (i in 1:length(q)){ leg[i]=roundpretty(legn[i],2) } legend("topright",pch=rev(symb),pt.cex=rev(ssize), legend=rev(leg), title="As [mg/kg]", cex=0.75) # continuously growing dot legend text(min(X)+diff(range(X))*5/8,max(Y),"Linearly",cex=0.70) text(min(X)+diff(range(X))*5/8,max(Y)-diff(range(Y))/25,"growing dots",cex=0.70) # scalebar scalebar(761309,7373050,861309,7363050,shifttext=-0.5,shiftkm=4e4,sizetext=0.8) # North arrow Northarrow(362602,7818750,362602,7878750,362602,7838750,Alength=0.15,Aangle=15,Alwd=1.3,Tcex=1.6) ### NEW MAP: # generate plot with packground plot(X,Y,frame.plot=FALSE,xaxt="n",yaxt="n",xlab="",ylab="",type="n") plotbg(map.col=c("gray","gray","gray","gray"),add.plot=T) bubbleFIN(X,Y,el,S=9,s=2,plottitle="",legendtitle="As [mg/kg]", text.cex=0.60, legtitle.cex=0.70,ndigits=2) # Percentile legend text(min(X)+diff(range(X))*5/7,max(Y),"Exponentially",cex=0.70) text(min(X)+diff(range(X))*5/7,max(Y)-diff(range(Y))/25,"growing dots",cex=0.70) #scalebar scalebar(761309,7373050,861309,7363050,shifttext=-0.5,shiftkm=4e4,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() |