.TH GRDVECTOR l DATE
#ifdef SI
#define UNIT cm
#define PARAMS 0.075/0.3/0.25
#else
#define PARAMS 0.03/0.12/0.1
#define UNIT inch
#endif
.SH NAME
grdvector \- Plot vector fields from grdfiles
.SH SYNOPSIS
\fBgrdvector\fP \fIcompx.grd\fP \fIcompy.grd\fP \fB\-J\fP\fIparameters\fP [ \fB\-A\fP ] 
[ \fB\-B\fP\fItickinfo\fP ] [ \fB\-C\fP\fIcptfile\fP ] [ \fB\-E\fP ] [ \fB\-F\fP\fIred/green/blue\fP ] 
[ \fB\-G\fP\fIfill\fP] [ \fB\-I\fP\fIx_inc\fP[m][/\fIy_inc\fP[m]] ] [ \fB\-K\fP ] [ \fB\-N\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] 
[ \fB\-Q\fP\fIparameters\fP ] [ \fB\-R\fP\fIwest/east/south/north\fP[\fIr\fP] ] [ \fB\-S\fP\fIscale\fP ] 
[ \fB\-T\fP ] [ \fB\-U\fP[\fI/dx/dy/\fP][\fIlabel\fP] ] [ \fB\-V\fP ] [ \fB\-W\fP\fIcontourpen\fP ] [ \fB\-X\fP\fIx-shift\fP ] 
[ \fB\-Y\fP\fIy-shift\fP ] [ \fB\-Z\fP\fIzlevel\fP ] [ \fB\-c\fP\fIcopies\fP ]
.SH DESCRIPTION
\fBgrdvector\fP reads two 2-D gridded files which represents the x- and y-components of a vector field and
produces a vector field plot by 
drawing vectors with orientation and length according to the information in the files.  Alternatively,
polar coordinate components may be used (r, theta).
\fBgrdvector\fP is basically a short-hand for using 2 calls to \fBgrd2xyz\fP and pasting the output through
\fBpsxy \-SV\fP.
.TP
\fIcompx.grd\fP
Contains the x-component of the vector field.
.TP
\fIcompy.grd\fP
Contains the y-component of the vector field. 
#include "explain_-j.txt"
.SH OPTIONS
No space between the option flag and the associated arguments.
.TP
.B \-A
Means grdfiles have polar (r, theta) components instead of Cartesian (x, y).
#include "explain_-b.txt"
.TP
.B \-C
Use \fIcptfile\fP to assign colors based on vector length.
.TP
.B \-E
Center vectors on grid nodes [Default draws from grid node].
.TP
.B \-F
Sets the color used for Frame and annotation. [Default is black]
.TP
.B \-G
Sets color or shade for vector interiors [Default is no fill].
#include "explain_-K.txt"
.TP
.B \-N
Do NOT clip vectors at map boundaries [Default will clip].
#include "explain_-O.txt"
#include "explain_-P.txt"
.TP
.B \-Q
Select vector plot [Default is stick-plot].  Optionally, specify \fIparameters\fP which
are \fIarrowwidth/headlength/headwidth\fP (in UNIT) [Default is PARAMS].  Append n\fIsize\fP
which will cause vectors shorter than \fIsize\fP to have their appearence scaled by length/\fIsize\fP.
#include "explain_-R.txt"
Specify a subset of the grid.
.TP
.B \-S
Sets scale for vector length in data units per UNIT [1].
.TP
.B \-T
Means azimuth should be converted to angles based on the selected map projection.
#include "explain_-U.txt"
#include "explain_-V.txt"
.TP
.B \-W
Set pen attributes used for vector outlines [Default: width = 1, color = 0/0/0, texture = solid].
#include "explain_-XY.txt"
.TP
.B \-Z
Means the angles provided are azimuths rather than direction (requires \fB\-A\fP).
#include "explain_-c.txt"
.SH EXAMPLES
To draw the vector field given by the files r.grd and theta.grd on a linear plot
using vector rather than stick plot, and scale vector magnitudes so that 10 units
equal 1 UNIT, try 
.br
.sp
grdvector r.grd theta.grd \fB\-Jx\fP2 \fB\-Q\fP \fB\-S\fP0.1 > gradient.ps
.br
.sp
.SH SEE ALSO
gmt, grdcontour, psxy
#include "refs.i"
