hohenTp<- read.table("C:/CLIM/HohenT.txt",header=T) ### hohenPr<- read.table("C:/CLIM/HohenP.txt",header=T) ### karlsTp<- read.table("C:/CLIM/KarlsT.txt",header=T) ### karlsPr<- read.table("C:/CLIM/KarlsP.txt",header=T) ### potsdTp<- read.table("C:/CLIM/PotsdT.txt",header=T) ### potsdPr<- read.table("C:/CLIM/PotsdP.txt",header=T) ### postscript(file="C:/CLIM/MonthTP.ps",height=8,width=20,horiz=F) par(mfrow=c(2,3),pty="s") #2x3 pictures of squared size plotTP<- function(mo,ttext,cylim,tylab,cabl){ plmo<-c(mo,mo[12]) #plmo[13]: right corner of last step x<- seq(0.5,12.5,by=1) plot(x,plmo,type="s", #step function plot xlim=c(0.5,12.5),ylim=cylim,xaxt="n",xlab="Month",ylab=tylab) axis(side=1,at=c(1:12), labels=c("J","F","M","A","M","J","J","A","S","O","N","D")) title(main=ttext,cex=1.1); abline(h=cabl,lty=3) } monthTP<- function(mon12,ttext,cylim,tylab,cabl){ mon12.mat<- as.matrix(mon12) #mon12 as matrix mon12.me<- colMeans(mon12) #monthly means plotTP(mon12.me,ttext,cylim,tylab,cabl) } #------------------------------------------------------------- cylim<- c(-2,20); tylab<- "Temperature [C]" cabl<- c(0:4)*5 mon12<- data.frame(hohenTp[,3:14])/10 #select jan-dec monthTP(mon12,"Temp. Hohenpeissenbg",cylim,tylab,cabl) mon12<- data.frame(karlsTp[,3:14])/10 monthTP(mon12,"Temp. Karlsruhe",cylim,tylab,cabl) mon12<- data.frame(potsdTp[,3:14])/10 monthTP(mon12,"Temp. Potsdam",cylim,tylab,cabl) #----Similarly with precipitation----------------------------- dev.off() rm(list=objects()) ###