Introduction | New User | Analysis | Graphics | Macros | Inline Functions |

Blackboard | Input-Output |Data Format (part 1) | Data Format (part 2) |

Appendix | Application Programmer Interface (API) | API How To


Graphics Capabilities


Overview

This section describes the graphics devices that are currently supported and then briefly describes the commands in each of the graphics functional modules.


Graphics Devices

There are three graphics ``devices'' currently supported.

Each device is described in more detail below. The number, type, and names of the graphics devices available on your system may be different from this list. Check with your system administrator or use the REPORT DEVICES command to determine which devices are available.

SGF stands for SAC Graphics File. A SAC Graphics File contains all the information needed to generate a single plot on any graphics device. (Using the current computer jargon, these are called graphics ``metafiles.'') Each plot is stored in a separate file. The file names are of the form ``Fnnn.SGF'' where ``nnn'' is the plot number, beginning with ``001''. You can control some features of this file name using the SGF command. Programs are available which can display these files to the terminal, merge several files into a single file, or produce an alphanumeric dump of a file for debugging. Programs are also available to convert these files to specific graphics devices such as the Apple Laserwriter, Houston Instruments pen plotter, etc. Some programs which handle SGF files are distributed with SAC2000 in either the bin or the utils directories. It is fairly easy to create such a conversion program. These programs and the SGF file format are described in the SGF Users Manual.

XWINDOWS (or X for short) is a windowing scheme developed under the industry-financed Athena project at MIT. X employs what is called a network model, where a single process or server controls the screen display. Other programs send requests to this server when they want to modify part of the screen. X is widely used on the graphics workstation and offers one of the best frameworks for developing portable window-based applications.

SUNWINDOW is a windowing system available on SunOS 4.X.

Each program contains its own set of procedures to control the screen. The two windowing systems are incompatable. You must be running under one or the other at any given time. Benchmarks using the SAC graphics library do not show significant difference in graphics display speeds between these two windowing systems.


Graphics Control Module

These commands control device selection and certain aspects of the display.

BEGINDEVICES selects one or more graphics devices for plotting and

ENDDEVICES deselects plotting to those devices.

ERASE erases the graphics display area,

VSPACE controls the maximum size and shape of plots, and

SGF controls certain options for the SAC Graphics File device.


Graphics Action Module

The commands in this module are mostly action-producing ones that create plots in various formats.

PLOT plots each signal in memory on a separate plot.

PLOT1 plots a set of signals on a single plot with a common x axis and separate y axes.

PLOT2 plots a set of signals on a single plot with common x and y axes (i.e. an overlay plot).

PLOTPK produces a plot for the picking of arrival times, seismic phases, coda, etc. The format is similiar to that of PLOT1. A cursor is used to do the picking. The picks go into the header and can also be written into a HYPO pick file (OHPF) or an alphanumeric pick file (OAPF).

PLOTPM generates a ``particle-motion'' plot on pairs of signals.

FILEID controls the display of a file identification and

FILENUMBER controls the display of file numbers on the sides of plots.

PICKS controls the display of time picks on these plots.

SETDEVICE lets you select a default graphics device to be used when plotting.

PLOTC nnotates SAC2000 plots and creates figures using cursor.

PLOTALPHA reads alphanumeric data files on disk into memory and plots the data to the current output device.

PLOTDY creates a plot with error bars.

PLOTXY plots one or more data files versus another data file.


Graphics Environment Module

The commands in this module are mostly parameter-setting ones that control various parts of the plots produced by the Graphics Action Module.

XLIM and YLIM control the plot limits for the x and y axes.

XVPORT and YVPORT control the location of the plot within the plotting area.You can specify a title (TITLE), x and y axes labels (XLABEL and YLABEL),

and a set of general plot labels (PLABEL).

There are several commands that control the displaying of the data itself:

LINE controls linestyle selection, SYMBOL controls symbol plotting, and

COLOR controls color selection.

GTEXT controls the quality and font of text used in plots and

TSIZE controls the text size attributes.
If you are using a multi-windowing workstation, you can use the WINDOW command to set the location and shape of the graphics windows and the

BEGINWINDOW command to select a specific graphics window for plotting.

BEGINFRAME turns off automatic new frame actions between plots and ENDFRAME resumes automatic new frame actions. Combined with other graphics commands (especially XVPORT and YVPORT), these two commands can be used to create fairly complicated plots.

XLIN and XLOG turn on linear and logarithmic scaling for the x axis.

YLIN and YLOG do the same for the y axis.

You can also use the commands LINLIN, LINLOG, LOGLIN, and LOGLOG to set the scaling for both axes with one command.

XDIV and YDIV control the spacing between labeled divisions while

XFUDGE and YFUDGE change the ``fudge factors'' on the two axes.

AXES and TICKS control the location of labeled axes and tick marks.

GRID and BORDER control the plotting of grid lines and a surrounding border. There are also commands (XGRID and YGRID) that let you independently control gridding on either axis.

There are several commands which control the display of logarithmic axes:

XFULL and YFULL control the plotting of full logarithmic decades,

LOGLAB controls the plotting of secondary labels, and

FLOOR puts a minimum value on logarthimically scaled data.

LOADCTABLE allows the user to select a new color table for use in image plots.

WAIT tells SAC2000 whether or not to pause between plots.

WIDTH controls line-width selection for graphics devices.

NULL controls the plotting of null values.

Finally, the QDP command controls the ``quick and dirty plot'' option. I'll let you look that one up in the Command Reference Manual!


If you have technical questions about this page, contact:
peterg@llnl.gov -- Peter Goldstein


This page maintained by:

peterg@llnl.gov -- Peter Goldstein

LLNL Disclaimer
8/12/98
UCRL-MA-112836