Numerous minor options (more than 50) can only be changed by modifying the GMT defaults settings. These settings control such aspects of GMT as font types and sizes, pen thickness used for basemaps, linear interpolants used when interpolation is needed and many more (Figures 1.2, 1.3, and 1.4 show the parameters that affect plots). The GMT defaults reside in a file named .gmtdefaults. A user will typically have a ``master'' .gmtdefaults file in the home directory, and possibly more specialized .gmtdefaults files in certain sub- directories. If no such file exist in the current directory, GMT will attempt to open the user'’s master defaults file. If it is not present then the site-specific GMT defaults are used. These come preset from the GMT developers but may be modified prior to GMT installation. One typical change at this level is to select SI units rather than the default US/British units. It is recommended not to modify the system GMT defaults substantially since some applications may rely on the presence of a standard set of default values. Users may create a new .gmtdefaults file with the current GMT preset values using the gmtdefaults utility.
There are at least two good reasons why the GMT default options are placed in a separate parameter file:
As mentioned, GMT programs will attempt to open a file named
.gmtdefaults. At times it may be desirable to override
that default. As an alternative, we may supply another filename using
the +filename syntax, i.e., on the same command line as the
GMT command we append the name of the alternate .gmtdefaults
file with the plus sign as a prefix.
A perhaps less tedious method is to start each script with making a
copy of the current .gmtdefaults, then copy the desired
.gmtdefaults file to the current directory, and finally
undo the changes at the end of the script. To change some of the
GMT parameters on the fly inside a script the gmtset utility can
be used. E.g., to change the annotation font to 12 point Times-Bold
we run
gmtset ANOT_FONT Times-Bold ANOT_FONT_SIZE 12
In addition to these 29 parameters that directly affect the plot there are numerous parameters than modify units, scales, etc. For a complete listing, see the gmtdefaults man pages.
At the end of the script one can then reset the specific parameters back to what they originally were. We suggest that you go through all the available parameters at least once so that you know what is available to change via one of the proposed mechanisms.