A script to plot a curve with axes

The script file, `graph.pcm`, listed below, reads two columns of numbers, in free format, from a file. The name of the file is passed to the script via the generalized parameter, `?1`. The first column is stored in a vector called `X` and the second column is stored in a vector called `Y`. The script then produces an autoscaled graph of `Y` versus `X` using joined plotting symbols. Plotting symbol number one, a `box', is used. The plot is then labeled with the date and time, positioned interactively. Note that comments begin with a `!`.

     ! script file   graph.pcm
     !
     READ ?1 X Y    ! read two columns of numbers into vectors X and Y
     SET PLOTSYMBOL 1    ! plotting symbol #1, joined
     GRAPH X Y      ! plot the data, autoscaled, with axes
     TEXT DATE      ! draw the current date using the graphics cursor
     TEXT TIME      ! draw the current time using the graphics cursor

The figure below was produced by entering the command: `@graph file.dat` The data file, with two columns of numbers, is also shown below.

     1.1  2.2
     1.2  2.4
     1.3  2.6
     1.4  3.1
     1.5  4.5
     1.6  5.1

Basic example
Getting the axis numbers right