The following pages contain a listing of the Fortran source for a program called XYPLOT, plus a sample input file and the plot it produces. As well as demonstrating several of the facilities described in this document, XYPLOT may be useful as a template for developing other simple graphics utilities, and can be used in its own right as a convenient way of producing a presentable plot of a list of (x,y) data. The Fortran source may be found in the file NCAR_DIR:XYPLOT.FOR on VAX/VMS and in the archive /star/starlink/lib/snx/examples/snx-examples_source.tar on UNIX. On VAX/VMS, this program may be compiled, linked and run using the command sequence
$ FORTRAN NCAR_DIR:XYPLOT $ LINK XYPLOT, NCAR_DIR:SNX_LINK/OPT, STAR_LINK/OPT $ RUN XYPLOT
On UNIX, this program may already be installed in directory /star/bin/examples/snx. If it has been deinstalled and removed to save space, you can copy the entire source directory to a scratch dircetory, and with the SYSTEM environment variable set appropriately, build and run it thus:
% setenv SYSTEM alpha_OSF/1 % ./mk xyplot % ./xyplot
XYPLOT reads an input file and plots a graph. The input file consists
of a sequence of alphanumeric records, the first three of which are the
labels (title, x-axis, y-axis) with the rest each containing an (x,y)
point (in free format). The example data may be found in the file
NCAR_DIR:XYPLOT.DAT on VAX/VMS and /star/bin/examples/snx/xyplot.dat on UNIX (if installed). The
resulting graph consists of a line joining the points in the order in
which they are given.
SNX --- Starlink Extensions to the NCAR Graphics Utilities