Next: 7.1 The making of Up: GMT - Technical Reference Previous: 6.4.7 Van der Grinten Contents Index

#
7. Cook-book

In this section we will be giving several examples of typical usage of GMT programs. In general, we will start with a raw data set, manipulate the numbers in various ways, then display the results in diagram or map view. The resulting plots will have in common that they are all made up of simpler plots that have been overlaid to create a complex illustration. We will mostly follow the following format:

1. We explain what we want to achieve in plain language.

2. We present an annotated Bourne shell script that contains all commands used to generate the illustration.

3. We explain the rationale behind the commands.

4. We present the illustration, 50% reduced in size, and without the timestamp (-U).

A detailed discussion of each command is not given; we refer you to the manual pages for command line syntax, etc. We encourage you to run these scripts for yourself. See Appendix D if you would like an electronic version of all the shell-scripts (both sh and csh scripts are available; only the sh-scripts are discussed here) and support data used below. Note that all examples explicitly specifies the measurement units, so although we use inches you should be able to run these scripts and get the same plots even if you have cm as the default measure unit. The examples are all written to be ``quiet'', that is no information is echoed to the screen. Thus, these scripts are well suited for background execution.

Note that we also end each script by cleaning up after ourselves. Because awk is broken as designed on some systems, and nawk is not available on others we refer to $AWK in the scripts below; the do_examples.sh scripts will set this when running all examples.

Finally, be aware that for practical purposes the output PostScript file name is stored as the variable `ps`.

Subsections

- 7.1 The making of contour maps
- 7.2 Image presentations
- 7.3 Spectral estimation and xy-plots
- 7.4 A 3-D perspective mesh plot
- 7.5 A 3-D illuminated surface in black and white
- 7.6 Plotting of histograms
- 7.7 A simple location map
- 7.8 A 3-D histogram
- 7.9 Plotting time-series along tracks
- 7.10 A geographical bar graph plot
- 7.11 Making a 3-D RGB color cube
- 7.12 Optimal triangulation of data
- 7.13 Plotting of vector fields
- 7.14 Gridding of data and trend surfaces
- 7.15 Gridding, contouring, and masking of unconstrained areas
- 7.16 Gridding of data, continued
- 7.17 Images clipped by coastlines
- 7.18 Volumes and Spatial Selections
- 7.19 Color patterns on maps
- 7.20 Custom plot symbols
- 7.21 Time-series of RedHat stock price
- 7.22 World-wide seismicity the last 7 days
- 7.23 All great-circle paths lead to Rome
- 7.24 Data selection based on geospatial criteria
- 7.25 Global distribution of antipodes
- 7.26 General vertical perspective projection

Next: 7.1 The making of Up: GMT - Technical Reference Previous: 6.4.7 Van der Grinten Contents Index