GRDCONTOUR
Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index
Return to Main Contents
#ifdef SI
#define UNIT cm
#define SCALE1 1.5 cm/degree
#define SCALE2 -Jm1.5
#define G_OPT 10/10
#define T_OPT 0.5/0.1
#else
#define UNIT inch
#define SCALE1 0.5 inch/degree
#define SCALE2 -Jm0.5
#define G_OPT 4/10
#define T_OPT 0.2/0.05
#endif
NAME
grdcontour - contouring of 2-D gridded data sets
SYNOPSIS
grdcontour grdfile -Ccont_int -Jparameters [ -Aanot_int[ffont_size][aangle][/r/g/b][o]] ]
[ -Btickinfo ] [ -Ddumpfile ] [ -Eazimuth/elevation ] [ -Fred/green/blue ] [ -Ggap/width ]
[ -K ] [ -Llow/high ] [ -M[flag] ] [ -O ] [ -P ] [ -Qcut ] [ -Rwest/east/south/north[r] ]
[ -Ssmoothfactor ] [ -T[+|-][gap/length][:LH] ] [ -U[/dx/dy/][label] ] [ -V ] [ -Wtype[pen] ]
[ -Xx-shift ] [ -Yy-shift ] [ -Zfactor ] [ -ccopies ]
DESCRIPTION
grdcontour reads a 2-D gridded file and produces a contour map by tracing
each contour through the grid. As an option, the x/y/z positions of the contour lines may be dumped to
a single multisegment file or many separate files. PostScript code is generated and sent to standard output. Various options
that affect the plotting are available.
No space between the option flag and the associated arguments. Use upper case for the
option flags and lower case for modifiers.
- grdfile
-
2-D gridded data set to be contoured
- -C
-
The contours to be drawn may be specified in one of three possible ways:
If cont_int has the suffix ".cpt" and can be opened as a file, it is assumed
to be a color palette table. The color boundaries are then used as contour levels.
If the cpt-file has anotation flags in the last column then those contours will be
anotated. By default no contours are labeled; use -A to anotate all contours.
If cont_int is a file but not a cpt-file, it is expected to contain contour levels
in column 1 and a C(ontour) OR A(nnotate) in col 2. The levels marked C (or c) are contoured,
the levels marked A (or a) are contoured and annotated. Optionally, a third column may be
present and contain the fixed anotation angle for this contour level.
If no file is found, then cont_int is
interpreted as a constant contour interval. If -A is set and -C is not, then
the contour interval is set equal to the specified anotation interval.
If a file is given and -T is set,
then only contours marked with upper case C or A will have tickmarks.
#include "explain_-j.txt"
OPTIONS
No space between the option flag and the associated arguments.
- -A
-
anot_int is annotation interval in data units. Ignored if contour levels are given in a file.
[Default is no annotations]. Several options can be set to modify the form of the annotation. Append ffont_size to change font size [9], append /r/g/b to change color of text fill box
[PAGE_COLOR], append aangle to fix annotation angle [Default follows contour], and append 'o' to draw the outline of the surrounding text box [Default is no outline].
#include "explain_-b.txt"
- -D
-
Dump the (x,y,z) coordinates of each contour to separate files, one for each contour segment. The
files will be named dumpfile_cont_segment[_i].xyz, where cont is the contour value and
segment is a running segment number for each contour interval (for closed contours we append _i.)
However, when -M
is used in conjunction with -D a single multisegment file is created instead.
- -E
-
Sets the viewpoint's azimuth and elevation for perspective view [180/90]
- -F
-
Sets the color used for Frame and annotation. [Default is black]
- -G
-
gap is distance in UNIT between each annotation along the same contour.
width is number of points over which to estimate the best fitting slope
for contour labels [Default is G_OPT].
#include "explain_-K.txt"
- -L
-
Limit range: Do not draw contours for data values below low or above high.
- -M
-
When used in conjunction with -D a single multisegment file is created, and
each contour section is preceeded by a header record whose first column is flag
followed by the contour level.
#include "explain_-O.txt"
#include "explain_-P.txt"
- -Q
-
Do not draw contours with less than cut number of points [Draw all contours].
#include "explain_-R.txt"
[Default is region defined in the grd file].
- -S
-
Used to resample the contour lines at roughly every (gridbox_size/smoothfactor) interval.
- -T
-
Will draw tickmarks pointing in the downward direction every gap along the innermost closed contours. Append gap and tickmark length (in UNIT) or use defaults [T_OPT].
User may choose to tick only local highs or local lows by specifying -T+ or -T-, respectively. Appending :LH will plot the characters L and H at the center of closed
innermost contours (local lows and highs). L and H can be any single character (e.g., LH, -+, etc.)
If a file is given by -C and -T is set,
then only contours marked with upper case C or A will have tickmarks [and anotation].
#include "explain_-U.txt"
#include "explain_-V.txt"
- -W
-
type, if present, can be 'a' for annotated contours or 'c' for regular contours [Default].
pen sets the attributes for the particular line. Default values for annotated contours:
width = 3, color = black, texture = solid. Regular contours have default width = 1.
#include "explain_-XY.txt"
- -Z
-
Use to multiply data values by factor before contouring starts.
(Numbers in A, -C, -L refer to values after this scaling has occurred.)
#include "explain_-c.txt"
EXAMPLES
To contour the file hawaii_grav.grd every 25 mGal on a Mercator map at SCALE1, annotate
every 50 mGal (using fontsize = 10), using 1 degree tickmarks, and draw 30 minute gridlines, try
grdcontour hawaii_grav.grd SCALE2 -C25 -A50f10 -B1g30m > hawaii_grav.ps
To contour the file image.grd using the levels in the file cont.d on a linear projection at 0.1 UNIT/x-unit
and 50 UNIT/y-unit, using 20 (x) and 0.1 (y) tickmarks, smooth the contours a bit, use "RMS Misfit" as
plot-title, use a thick red pen for annotated contours, and a thin, dashed, blue pen for the rest, try
grdcontour image.grd -Jx0.1/50.0 -Ccont.d -S4 -B20/0.1:."RMS Misfit":
-Wa5/255/0/0 -Wc1/0/0/255ta | lpr
BUGS
The text-outline box has not been implemented for perspective view plots. Anotations will plot correctly, but contours will go right through the text.
The labeling of local highs and lows may plot outside the innermost contour since only the mean value
of the contour coordinates is used to position the label.
There are too many options.
SEE ALSO
gmt, psbasemap, grdimage, grdview, pscontour
#include "refs.i"
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- BUGS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 07:10:53 GMT, January 07, 2025