#! /bin/sh # sm.example -- a very simple sm script wait=$1 date=`date '+%D %H:%M'` sm -s << FIN if ($wait) {xterm_p} else {laser_pp sm_example.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 sm_example.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 10 0 100 box set x=1,9 set y=x**2 ptype 4 0 points x y connect x y expand 1.1 xlabel x ylabel y limits 0 10 0 10 relocate 0 10.5 putlabel 6 A Parabola if ($wait) {!sleep $wait} else {hardcopy} FIN