# Make response spectrum diagram (log-log) plot( 001,0.01, log="xy", type="n", xlim=c(0.01,10), ylim=c(10,10000), xlab="Period (sec)", ylab="Response acceleration (gal)", axes=FALSE ) mtext(text=" h=0.05",side=3,line=0,adj=0) cc<-seq(1,9,by=1) c1<-c(cc*0.01,cc*0.1,cc,10) c2<-c(cc*10,cc*100,cc*1000,10000) abline(v=c1,col="gray") abline(h=c2,col="gray") axis(1,c(0.01,0.1,1,10)) axis(2,c(10,100,1000,10000)) box() d1<-read.table("dat_spc_1.txt",skip=1) d2<-read.table("dat_spc_2.txt",skip=1) d3<-read.table("dat_spc_3.txt",skip=1) lines(d1[,1],d1[,2],lwd=2,col="red") lines(d2[,1],d2[,2],lwd=2,col="blue") lines(d3[,1],d3[,2],lwd=2,col="green") legend( "bottomleft", c("TCGH16_EW2","TCGH16_NS2","TCGH16_UD2"), col = c("blue","red","green"), lty = c(1,1,1), lwd = c(2,2,2), bg = "white" )