SAC Plotting

A particular strength of SAC is in visualizing the data after it is processed.  SAC can be programmed to give a wide variety of plot types.  Usually, a graphics window is initialized to view the plot and commands can be given to interactively change plot characteristics.  Once the plot has been constructed in suitable form, it can be saved to a SAC graphics file in "sgf" format.  These sgf files are then usually converted to another format, like PostScript, for output to a printer or as input to another graphics program.

This plot was made using the following commands while working on a Macintosh at home:

SAC> r mlnt.z mlnt.r mlnt.t
SAC> xvport 0.1 0.6
SAC> qdp off
SAC> xlim 58 70
SAC> title on "Rotated Data at MLNT"
SAC> xlabel on "Time, sec"
SAC> ylabel on "Digital Counts"
SAC> bd tek4014
SAC> p1
SAC> bd sgf
SAC> p1
SAC> ed sgf
SAC> sgftops f001.sgf plot1 1 y
SAC> q
Read the three data files
change the x direction aspect ratio for the plot
turn of the "quick and dirt plot" option
only plot time series data between 58 and 70 seconds
make a title
make a label for the x axis
make a label for the y axis
turn on the tek4014 device to plot to tek window on my mac at home
plot all of this stuff using "plot1", view and decide to save to a file
begindevice sgf to save to a sgf file
use p1 again, all other commands have been saved by SAC
enddevice sgf to finish the sgf plot file
use the sgftops conversion utility to convert the sgf file to PostScript
At this point I ftp'd the plot file to the Mac and used Adobe Illustrator to convert the PostScript plot into a gif file for this webpage.  Usually, I combine a number of SAC plots with Adobe Illustrator to produce a figure.

Common plotting commands include:


last modified 3/05/01