SAC Command Reference Manual

PLOTALPHA

SUMMARY

Reads alphanumeric data files on disk into memory and plots the data to the current output device. This differs from readalpha followed by plot because it allows you to plot a label with each data point.

SYNTAX

READALPHA {options}  {filelist}

where options is one or more of the following:

MORE
DIR CURRENT|name
FREE|FORMAT text
CONTENT text
PRINT {printer}

All options must preceed any element in the filelist.

The last two options may also be placed on the first line of file itself.

INPUT

MORE:Append the new data files after the old ones in memory. If this option is missing, the new data replaces the old data in memory. See the READ command for more details about this option.
DIR CURRENT:Read and plot all simple filenames (with or without wildcards) from the current directory. This is the directory from which you started SAC.
DIR name:Read and plot all simple filenames (with or without wildcards) from the directory called name. This may be a relative or absolute directory name.
FREE:Read and plot the data in the filelist in free format (space delimited) mode.
FORMAT text:Read and plot the data in the filelist in fixed format mode. The format statement to use is given in text.
CONTENT text:Define the content of the data in the filelist. The meaning of the content text is described below.
PRINT {pname}:Print the resultant plot. If pname is specified, print to named printer, else use default printer.
filelist:A list of alphanumeric files. This list may contain simple filenames, full or relative pathnames, and wildcard characters. See the READ command for a complete description.

DEFAULT VALUES

PLOTALPHA FREE CONTENT Y. DIR CURRENT

DESCRIPTION

All commands in SAC work on the data that is currently in memory. This data in memory is analogous to the temporary or working files used by a text editor. The READ command reads binary SAC data files into memory. This command can be used to read a wide variety of alphanumeric data files into memory. These files can be in a fixed format or in free format. They may contain evenly or unevenly spaced data. They may contain more than one set of data. There may be only one label and the label is not retained in memory with the data.

The simplest use of this command is free field input of a Y data set. This is also the default. Free field input of X-Y pairs can be done by simply changing the content option. By combining the fixed format and content options, this command can also be used to read very complicated formatted output from other programs directly into SAC. Multiple Y data sets can be read from the same file using this method. Only a single X data set is allowed.

The basic header variables needed for processing are computed. These are NPTS, B, E, DELTA, LEVEN, DEPMIN, DEPMAX, and DEPMIN. If there is only a single Y data set, the name of the data file in memory will be the same as that of the alphanumeric disk file. If there are multiple Y data sets in the file, a two digit sequence number is appended to the file name. Each line of the alphanumeric data file is read in either free format or using the format statement provided. Each line can be up to 160 characters long. In the case of a free format file, the number of data entries in each line is also determined. The content field is then used to determine what to do with each of these data entries. Each specific character in the context field represents a different kind of data element and the order of these characters mimics the order of the data in each line of the file. The meanings of the allowed characters in the content field are given below:

L:Next entry is the label to plot with each data point (only one per data set).
Y:Next entry belongs to Y (dependent variable) data set.
X:Next entry belongs to X (independent variable) data set.
N:Next entry belongs to next Y data set.
P:Next pair of entries belong to X and Y data sets.
R:Next pair of entries belong to Y and X data sets.
I:Ignore (skip) this data element.

An optional repetition count may follow any of the above characters. This repetition count is a one or two digit integer and has the same meaning as repeating the content character that number of times. A period (".") is an infinite repetition count and means use the last characters meaning to decode the remaining data elements in the line. The period can only appear at the end of a content field.

EXAMPLES

To read and plot X-Y pairs in free format where the first field is the label:

SAC> PLOTALPHA CONTENT LP FILEA

You can't break an X-Y pair between lines in the file.

ERROR MESSAGES

  • 1301: No data files read in.
    • haven't given a list of files to read.
    • none of the files in the list could be read.
  • 1020: Invalid inline function name:
    • Expected inline function. Preceed parenthesis with an atsign.
  • 1320: Available memory too small to read file
  • 1314: Data file list can't begin with a number.
  • 1315: Maximum number of files in data file list is

WARNING MESSAGES

  • 0101: opening file
  • 0108: File does not exist:

HEADER CHANGES

B, E, DELTA, LEVEN, DEPMIN, DEPMAX, DEPMEN.

SEE COMMANDS

READ, WRITE, READALPHA

LATEST REVISION

July 22, 1992 (Version 10.6f)