SAC Command Reference Manual

BEGINFRAME

SUMMARY

Turns off automatic new frame actions between plots.

SYNTAX

BEGINFRAME {PRINT {pname} }

INPUT

PRINT {pname}:When PRINT is used with BEGINFRAME, it signals the assocated call to ENDFRAME to print the resulting plot to the printer named in pname, or to the default printer if pname is not used. (This makes use of the SGF capability.)

ALTERNATE FORMS

BEGFR is an obsolete but allowable form of this command.

DESCRIPTION

A "new frame action" is defined as the clearing of the current graphics display surface. Specifically it is:

  • the erasing of the screen for a graphics terminal.
  • the closing of the current file for the SGF device driver.
  • the erasing of the current graphics window on a multi-window workstation.
  • the advancing of the film one frame for a film device.
  • the movement of the paper to a new area on a pen plotter.

Normally SAC does a new frame action before each new plot (PLOT, PLOT1, etc.) SAC stops doing this new frame action when the BEGINFRAME command is executed. It resumes automatic framing when the ENDFRAME command is executed. Therefore, all plot commands executed between these two commands will have their output placed on the same frame. By changing the viewport (XVPORT, YVPORT) between plot commands, by changing some of the various plot options, and by reading in different sets of data files, fairly complicated plots with multiple images can be easily generated. See the example and figure below. You MUST execute the ENDFRAME command to discontinue this mode and to resume automatic framing between plots.

EXAMPLES

The plot that follows was generated using the set of commands shown below. Comments about the process are given in parenthesis:

SAC> CUT A -0.2 N 512        (set up cut and read file)
SAC> READ FILE1
SAC> BEGINFRAME          (turn off automatic framing)
SAC> XVPORT .1 .9        (define viewport and options)
SAC> YVPORT .7 .9
SAC> TITLE 'SEISMIC TRACE'
SAC> FILEID OFF          (turn off fileid and qdp option)
SAC> QDP OFF
SAC> PLOT                (plot the trace)
SAC> FFT WMEAN           (take transform of data)
SAC> XVPORT .1 .45       (second viewport and options)
SAC> YVPORT .15 .55
SAC> TITLE 'Amplitude Response (linlog)'
SAC> YLIM 1E-5 1
SAC> PLOTSP AM LINLOG    (plot the amplitude)
SAC> XVPORT .55 .9       (third viewport and options)
SAC> TITLE 'Amplitude Response (loglog)'
SAC> XLIM 1 60
SAC> PLOTSP AM LOGLOG    (plot amplitude again)
SAC> ENDFRAME            (resume automatic framing)
SAC> CUT OFF             (reset parameters used to default values)
SAC> FILEID ON
SAC> XLIM OFF
SAC> YLIM OFF

The last four commands reset some of the parameters used in this operation to their default values. This is a good habit to get into, especially when writing macros, as a way of avoiding the problem of one macro effecting the operation of others that follow.

SEE COMMANDS

ENDFRAME, XVPORT, YVPORT

LATEST REVISION

May 15, 1987 (Version 10.2)

Use of BEGINFRAME and ENDFRAME to Create a Special Plot