top banner
General Issues
1: Introduction
2: Simple example
3: Fancy example
4: Running Gri
5: Programming Gri
6: General Issues
7: X-Y Plots
8: Contour Plots
9: Image Plots
10: Examples
11: Handling Data
12: Gri Commands
13: Gri Extras
14: Evolution of Gri
15: Installing Gri
16: Gri Bugs
17: System Tools
18: Acknowledgments
19: License
20: Newsgroup

21: Concept Index
navigate navigate navigate navigate navigate navigate

6.6: Library Files

The directory `/usr/local/lib/gri' contains small Gri programs to be run together with your own gri programs, providing a library of Gri code. Gaining or preventing access to this library directory, and to other directories of your own making, is done with the `GRIINPUTS' unix environment variable; see Options On Command Line. The following examples show how one might use these library files to modify the plots normally produced by a user-created commandfile. In the first examples, `myfile.gri' is a user-created commandfile, to be modified by the extra library commandfile. Convention Since Gri doesn't require the specification of the `.gri' suffix in commandfile names, it is mnemonic to list user-created commandfiles with the suffix, and library files without. You should follow this convention. Note: These library files are a new feature of Gri, and there is a good chance that library files on your system might change. Therefore, if there is a file that you use a lot, you should put it in your `~/lib/gri' directory, and modify your `GRIINPUTS' unix environment variable to contain this directory, by putting this line
export GRIINPUTS=".:$HOME/lib/gri:/usr/local/lib/gri"
in your `~/.environment' file. (This instruction is for Bash-shell users; others ask system manager how to get this environment variable defined in this way.)
  • `gri 10pt,myfile.gri' Run Gri on `myfile.gri', but make the fontsize 10 point before executing first line of `myfile.gri'. Provided that `myfile.gri' does not change the fontsize, this means the text will be 10 point. Note that the library file, `/usr/local/lib/gri/10pt', consists of these lines:
    # @(#) 10pt.gri 1.2 (c) 93/05/05 Dan E. Kelley
    set font size 10
    
  • `gri 14pt,myfile.gri' As above, but make font larger (good for overhead transparencies, for example).
  • `gri palatino,14pt,myfile.gri' Use Palatino, 14 point, as the default font.
  • `gri TS' No local commandfile is used; instead, the library file `/usr/local/lib/gri/TS.gri' is used to make a temperature-salinity file is used.
  • `gri ticsin,TS' As above, but draw the tics inward from axes, instead of outward as the normal style dictates.
bottom banner