#! /bin/bash
#-------------------------------------------------------------------------------
data1=$( awk ' BEGIN {
  for ( x=0.02; x<30.0; x+=0.05 ) {
    printf("%10.3f %10.5f\n",x,sin(x)/x)
  }
}')
#-------------------------------------------------------------------------------
data2=$( awk ' BEGIN {
  for ( x=0.02; x<30; x+=0.05 ) {
    printf("%10.3f %10.5f\n",x,sin(x)/sqrt(x)+0.1)
  }
}')
#-------------------------------------------------------------------------------
jogcode="
(Times-RomanF) 25 Font
0.5 mm Pen
[ 50 550 50 800][ 0 30 -0.5 1 ] Axe2
[ (0) (10) (20) (30) ] GradX
[ (-0.4) (-0.2) (0) (0.2) (0.4) (0.6) (0.8) (1.0) ] GradY

gsave   % save current color pen etc...
    0.15 mm Pen
        [ Xmin 0 Xmax 0 ] Black 1 Dash Lines
grestore % restore color pen dash...
?
gsave
[
$data1
] Blue Lines
grestore
?
gsave
[
$data2
] 1 Dash Red Lines
grestore
300 720
% beware to escape ( in a postscript string
( Blue ) ( sin\(x\)/x ) Label
( Red 1 Dash Lines ) ( sin\(x\)/sqrt\(x\) )  Label
?
"
#-------------------------------------------------------------------------------

echo "$jogcode" > _.jog
ge _.jog
rm _.jog _.eps

