Graphics in the FOCMEC package

As discussed in Section 3.2 in the manual, program focplt produces plots of focal-sphere projections of data and/or fault-plane solutions, and program ratplt is the ratio plotting program for the FOCMEC package. Both use the SAC Graphics Format (SGF) to produce disk files. Program sgftops converts .sgf files to postscript files. The FOCMEC package can be compiled and run on “big-endian” systems (Sun Solaris, Mac OSX PPC) or “little-dndian” systems (Linux, Mac OSX i686/intel) that have the opposite byte order for binary data. Because a .sgf file is a binary file, for earlier versions of this package, program sgftops would only work on a .sgf file that had one byte order. Now the program works with either byte order. Also included are four (Unix .csh) scripts:
  1. plsgf: produces a print of a .sgf file.
  2. sgftoeps: produces a EPS file (Encapsulated Postscript file) from a .sgf file. Program gs is required. | (Resource page for ghostscript)
  3. sgftopdf: produces a PDF file from a .sgf file. Program gs and the Perl script epstopdf are required. | (Web page for epstopdf)
  4. sgftox: displays a plot on the terminal. As written, it uses gs to display the image. The file is an ASCII text file, so one can replace gs with another program, such as gv, which is available on Unix platforms. | (Web page for gv). If gv is in your path and you have a plot file in PDF format named foo.pdf, the command gv foo.pdf should display the plot.

To find out more the programs or scripts, enter the name with no arguments.

Several scripts in Section 4 run program focplt to produce SGF files. Some of the scripts combine both data and solutions, and others combine different sets or representations of solutions, so studying them may be helpful regarding how one answers the prompts. The screen output for these scripts is ported into a file named a.junk in the same directory, so if the script exits with an error message, comparing the contents of that file with the calling script should help the user find the error.

If one wants to learnmore about SGF format, one might run program ./focmec/bin/vwbeetle using the script ./focmec/tests/run_vwbeetle. The program produces the outline of a VW beetle in a .sgf file and converts the SGF file into a PDF file. The source code, ./focmec/src/vwbeetgle.f shows how to create a .SGF file. For more about SGF format, look at this page.

In program focplt, there is a prompt for adding labels to plots. If one wishes to add a label that is more complicated than letters and numbers, it might be helpful to learn more about the symbol subroutine called by program focplt. Script ./focmec/tests/run\_symdemo produces a screen display and PDF file that shows the capabilities of the symbol subroutine. This file has more information about the Symbol routine.