### hist-sample.R ### Mafuyu Kitahara ### 2007-04-25 ######### general parameters # give filename for print psfile <- "hist-sample.ps" # 2 panels in a row par(mfrow=c(1,2)) ########## 1st panel # get the data x <- scan("hist-sample1.dat") # histgram, color=red, xlimit and ylimit handset, no axes, title as "sample" hist(x, col=2,xlim=c(20,75),ylim=c(0,25),axes=F,main="sample1") # specify y-axis, tick line at 0to25, bigger font, all the way) axis(2,at=c(0:25),cex.axis=1.1,tck=1) # specify x-axis, (take the default) axis(1) ########## 2nd panel, just omit y-label y <- scan("hist-sample2.dat") hist(y, col=2,xlim=c(20,75),ylim=c(0,25),axes=F,main="sample2",ylab="") axis(2,at=c(0:25),cex.axis=1.1,tck=1) axis(1) ########## printing dev.copy(device=postscript,file=psfile,width=10,height=8) dev.off()