#========================================================================
#
# shell script for Sanders graphs using modified "graph" 
# plotting filter on Unix
#
# parameters:
#   $1 is the input file of points to be plotted
#   $2 is a label (in quotes) for the bottom edge of the graph 
#   $3 is an optional string, quoted on invocation, for other parameters
#
# notes:
#   1. _VP_ is a 1 meg bit map in the user's local space; it is
#      temporary, and there is no problem with lockout if each
#      user runs one job at a time.
#
#   2. _TMP_PTS_ is a temp file of data points to kludge around
#      some initial condition bug in splot.c.  A special line of
#      coordinates is written, then the data file is appended to it.
#
#   3. the h,w,u,r parameters to graph produce a single page plot that
#      meets thesis specs, i.e. 1.5 inch left,bottom margins, 1 inch 
#      right,top margins.
#
#========================================================================

    echo -n `head -1 $1` >_TMP_PTS_
    echo ' " "' >>_TMP_PTS_
    cat $1 >>_TMP_PTS_
    /va2/pds/graphics/sanders/graph.x \
      -h 0.73 -w 0.55 -r -0.17 -u 0.12 -x -3 3 -y -3 3 -g 1 -b -l " $2" $3 <_TMP_PTS_ \
      | /va2/pds/graphics/sanders/splot.x
    /va2/pds/graphics/sanders/sanprint.x <_VP_
    rm _VP_
    rm _TMP_PTS_

#========================================================================
