.TH PSCONTOUR l DATE
#ifdef SI
#define UNIT cm
#define G_OPT 10
#else
#define UNIT inch
#define G_OPT 4
#endif
.SH NAME
pscontour \- Contour xyz-data by direct triangulation
.SH SYNOPSIS
\fBpscontour\fP \fIxyzfile\fP \fB\-C\fP\fIcptfile\fP \fB\-J\fP\fIparameters\fP \fB\-R\fP\fIwest/east/south/north\fP[\fIr\fP] 
[ \fB\-A\fP[\fBf\fP\fIfont_size\fP][\fBa\fP\fIangle\fP][\fI/r/g/b\fP][o]] ] [ \fB\-B\fP\fItickinfo\fP ] [ \fB\-D\fP[\fIdumpfile\fP] ] [ \fB\-E\fP\fIview_az/view_el\fP ] 
[ \fB\-F\fP\fIred/green/blue\fP ] [ \fB\-G\fP\fIgap\fP ] [ \fB\-H\fP ] [ \fB\-I\fP ] [ \fB\-K\fP ] 
[ \fB\-M\fP[\fIflag\fP] ] [ \fB\-N\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-T\fP\fIindexfile\fP ] [ \fB\-U\fP[\fI/dx/dy/\fP][\fIlabel\fP] ] 
[ \fB\-V\fP ] [ \fB\-W\fP\fIpen\fP ] [ \fB\-X\fP\fIx-shift\fP ] 
[ \fB\-Y\fP\fIy-shift\fP ] [ \fB\-c\fP\fIcopies\fP ] [ \fB\-:\fP ] [ \fB\-b\fP[\fBd\fP] ]
.SH DESCRIPTION
\fBpscontour\fP reads an ASCII [or binary] xyz-file and produces a raw contour plot by triangulation.  By default, the
optimal Delaunay triangulation is performed, but the user may optionally provide a second file with
network information, such as a triangular mesh used for finite element modeling.  In addition to contours, the area between contours may be painted according to
the color palette file.
.TP
\fIxyzfile\fP
Raw xyz data to be contoured.
.TP
.B \-C
name of the color palette file.  Must have discrete colors if you want to paint the
surface (\fB\-G\fP).  Only contours that have anotation flags set will be anotated.
#include "explain_-j.txt"
#include "explain_-R.txt"
.SH OPTIONS
No space between the option flag and the associated arguments.
.TP
.B \-A
Several anotation formatting options can be set to modify the form of the annotation.  Append f\fIfont_size\fP to change font size [9], append \fI/r/g/b\fP to change color of text fill box
[PAGE_COLOR], append a\fIangle\fP 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"
.TP
.B \-D
Dump the (x,y,z) coordinates of each contour to separate files, one for each contour segment. The
files will be named \fIdumpfile_cont_segment[_i]\fP.xyz, where \fIcont\fP is the contour value and
\fIsegment\fP is a running segment number for each contour interval (for closed contours we append _i.)
However, when \fB\-M\fP is used in conjunction with \fB\-D\fP a single multisegment file is created instead.
.TP
.B \-E
Sets the view point by specifying azimuth and elevation in degrees. [Default is 180/90]
.TP
.B \-F
Sets the color used for Frame and annotation. [Default is black]
.TP
.B \-G
\fIgap\fP is distance in UNIT between each annotation along the same contour [Default is G_OPT].
#include "explain_-H.txt"
.TP
.B \-I
Color the triangles using the color palette table.
#include "explain_-K.txt"
.TP
.B \-M
When used in conjunction with \fB\-D\fP a single multisegment file is created, and
each contour section is preceeded by a header record whose first column is \fIflag\fP
followed by the contour level.
.B \-N
Do NOT clip contours or image at the boundaries [Defaults will clip to fit inside region \fB\-R\fP).
#include "explain_-O.txt"
#include "explain_-P.txt"
.TP
.B \-T
Give name of file with network information.  Each record must contain triplets of
node numbers for a triangle [Default computes these using Delaunay triangulation (see \fBtriangulate\fP)].
#include "explain_-U.txt"
#include "explain_-V.txt"
.TP
.B \-W
Select contouring and set contour pen attributes.
#include "explain_-XY.txt"
#include "explain_-c.txt"
#include "explain_-t.txt"
.TP
.B \-b
Expect binary, single precision triplets for xyz (and binary 4-byte integer triplets for node ids) rather than ASCII input.
[Default is ASCII].  Append \fBd\fP to indicate double precision for binary data [Default is single].
.SH EXAMPLES
To make a raw contour plot from the file topo.xyz and drawing the contours (pen = 2)
given in the color palette file topo.cpt on a Lambert map
at 0.5"/degree along the standard parallels 18 and 24, try 
.br
.sp
pscontour topo.xyz \fB\-R\fP320/330/20/30 \fB\-Jl\fP18/24/0.5 \fB\-C\fPtopo.cpt \fB\-W\fP2 > topo.ps
.br
.sp
To create a color \fIPostScript\fP plot of the numerical temperature solution obtained on a triangular mesh
whose node coordinates and temperatures are stored in temp.xyz and mesh arrangement is given by the file mesh.ijk, using
the colors in temp.cpt, try
.br
.sp
pscontour temp.xyz \fB\-R\fP0/150/0/100 \fB\-Jx\fP0.1 \fB\-C\fPtemp.cpt \fB\-G \-W\fP1 > temp.ps
.SH SEE ALSO
gmt, grdcontour, grdimage, nearneighbor, psbasemap, psscale, surface, triangulate
#include "refs.i"
Watson, D. F., 1982, Acord: Automatic contouring of raw data, \fIComp. & Geosci., 8\fP, 97\-101.
.br
