#! /bin/sh wait=$1 date=`date '+%D %H:%M'` sm -s << FIN if ($wait) {xterm_p} else {laser_pp converge.ps\n lweight 2} # running this with argument 10 will put the plot on your screen and # keep it there for 10 seconds. Running it with argument 0 will # produce a postscript file called converge.ps. If you change # "laser_pp converge.ps" to "laser_p", then running with 0 will # send output straight to your default printer. Note that "p" # indicates portrait mode; "l" for landscape and "s" for square # are also options. twowin 1 expand 0.95 limits 0.5 -5 -6 0 box define iexact (2.*(1.-1.0/sqrt(5.0))) da euler.out read {n 1 h 2 i 3} set ferr=lg(abs(i/\$iexact-1.0)) connect (lg(h)) ferr echo print {n h i ferr} echo ltype 2 da trapzd.out read {n 1 h 2 i 3} set ferr=lg(abs(i/\$iexact-1.0)) connect (lg(h)) ferr echo print {n h i ferr} echo ltype 1 da simpson.out read {n 1 h 2 i 3} set ferr=lg(abs(i/\$iexact-1.0)) connect (lg(h)) ferr echo print {n h i ferr} echo ltype 0 limits 0 10 0 10 urlinlbl 9.25 0 Euler urlinlbl 8.50 2 Trapezoidal urlinlbl 7.75 1 Simpson relocate 5 -1.8 putlabel 5 log h relocate -1.8 5 angle 90 putlabel 5 log(|I/I_{exact}-1|) angle 0 putdate "$date" if ($wait) {!sleep $wait} else {hardcopy} FIN