.TH PSXY l DATE
#ifdef SI
#define UNIT cm
#define PARAMS 0.075/0.3/0.25
#define CAP 0.25
#define LEN_1 0.25
#define LEN_2 5
#define OPT_1	\fB\-Jm\fP5 \fB\-Sc\fP0.25
#define OPT_2	\fB\-JX\fP15
#define LEN_3 2
#define OPT_3	\fB\-Jm\fP0.4 \fB\-Sf\fP2/0.25L
#else
#define UNIT inch
#define PARAMS 0.03/0.12/0.1
#define CAP 0.1
#define LEN_1 0.1
#define LEN_2 2
#define OPT_1	\fB\-Jm\fP2 \fB\-Sc\fP0.1
#define OPT_2	\fB\-JX\fP6
#define LEN_3 0.8
#define OPT_3	\fB\-Jm\fP0.15 \fB\-Sf\fP0.8/0.1L
#endif
.SH NAME
psxy \- Plot lines, polygons, and symbols on maps
.SH SYNOPSIS
\fBpsxy\fP \fIfiles\fP \fB\-J\fP\fIparameters\fP \fB\-R\fP\fIwest/east/south/north\fP[\fIr\fP] 
[ \fB\-A\fP ] [ \fB\-B\fP\fItickinfo\fP ] [ \fB\-C\fP\fIcptfile\fP ] [ \fB\-E\fP\fI[x][y][cap][/pen]\fP ] 
[ \fB\-F\fP\fIred/green/blue\fP ] [ \fB\-G\fP\fIfill\fP ] [ \fB\-H\fP ] [ \fB\-K\fP ] [ \fB\-L\fP ] 
[ \fB\-N\fP ] [ \fB\-M\fP[\fIflag\fP] ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-S\fP\fIsymbol/size\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\-:\fP ] [ \fB\-c\fP\fIcopies\fP ]
.SH DESCRIPTION
\fBpsxy\fP reads (x,y) pairs from \fIfiles\fP [or standard input] and
generates \fIPostScript\fP code that will plot lines, polygons, or symbols at those locations on a map.
If a symbol is selected and no symbol size given, then psxy will interpret the third column of the
input data as symbol size in UNIT.  Multiple segment files may be plotted using the \fB\-M\fP option.
If no symbols are selected, a line will be drawn.  To draw closed polygons, use \fB\-L\fP. Select a shade with \fB\-G\fP.  If \fB\-G\fP is set, \fB\-L\fP
will control whether the polygon outline is drawn or not.  If a symbol is selected, \fB\-G\fP and
\fB\-L\fP determines the fill color and outline/no outline, respectively.
The \fIPostScript\fP code is written to standard output. 
.TP
\fIfiles\fP
List one or more file-names. If no files are given, \fBpsxy\fP will read standard input.
#include "explain_-j.txt"
#include "explain_-R.txt"
.SH OPTIONS
No space between the option flag and the associated arguments.
.TP
.B \-A
Suppress drawing line segments as great circle Arcs.  [Default draws great circle arcs.]
#include "explain_-b.txt"
.TP
.B \-C
Give a color palette file and let symbol color be determined by the z-value in the
third column.  Must be used with \fB\-S\fP.  If used, then additional fields are
shifted over by one column (optional size would be 4th rather than 3rd field, etc.).
.TP
.B \-E
Draw error bars.  Append x and/or y to indicate which bars you want to draw.  The x and/or
y errors must be stored in the columns after the (x,y) pair [or (x,y,size) triplet].  The
\fIcap\fP parameter indicates the length of the end-cap on the error bars in UNIT [CAP].  Pen
attributes for error bars may also be set.  [Defaults: width = 1, color = 0/0/0, texture = solid].
.TP
.B \-F
Sets the color used for Frame and annotation. [Default is 0/0/0 (black)]
.TP
.B \-G
Select filling of polygons and symbols.  Set the shade (0\-255) or color (r/g/b) [Default is no fill].
For polygons, you may optionally specify \fB\-Gp\fP\fIicon_size/pattern\fP, where \fIpattern\fP gives the number of the
image pattern (1-32) OR the name of a icon-format file.  \fIicon_size\fP sets the unit size in UNIT.
To invert black and white pixels, use \fB\-GP\fP instead of \fB\-Gp\fP.  See \fBGMTs\fP Cookbook & Technical Reference
APpendix E for
information on individual patterns.
#include "explain_-H.txt"
#include "explain_-K.txt"
.TP
.B \-L
If a symbol is selected, \fB\-L\fP will draw the symbol outline using current pen (see \fB\-W\fP).  If no symbols are selected, \fB\-L\fP will connect the endpoints of the line-segment(s) and draw polygons.
.TP
.B \-M
Multiple segment file.  Segments are separated by a record whose first character is \fIflag\fP.
[Default is '>'].
.TP
.B \-N
Do NOT skip symbols that fall outside map border [Default plots points inside border only].
#include "explain_-O.txt"
#include "explain_-P.txt"
.TP
.B \-S
Plot symbols.  \fIsize\fP is symbol size in UNIT.  Choose between:
.TP
.B \-Sa
st\fBa\fPr.  \fIsize\fP is radius of circumscribing circle.
.TP
.B \-Sb
\fBb\fPar extending from \fIbase\fP to y.  \fIsize\fP is bar width.  By default,
\fIbase\fP = 0.  Append /\fIbase\fP to change this value.  Append \fBu\fP if \fIsize\fP
is in x-units [Default is UNIT].
.TP
.B \-Sc
\fBc\fPircle.  \fIsize\fP is diameter of circle.
.TP
.B \-Sd
\fBd\fPiamond.  \fIsize\fP is side of diamond.
.TP
.B \-Se
\fBe\fPllipse.  Direction (in degrees counterclockwise from horizontal), major_axis (in UNIT), and minor_axis (in UNIT) must be found in columns 3, 4, and 5.
.TP
.B \-Sf
\fBf\fPault.  Give distance gap between ticks and ticklength in UNIT.  If gap is
negative, it is interpreted to mean number of ticks instead.  Append \fBl\fP or \fBr\fP to draw tick on
the left or right side of line [Default is centered].  Upper case \fBL\fP or \fBR\fP draws a triangle
instead of line segment.
.TP
.B \-Sh
\fBh\fPexagon.  Give side in UNIT.
.TP
.B \-Si
\fBi\fPnverted triangle.  Give side in UNIT.
.TP
.B \-Sl
\fBl\fPetter or text string.  Give size in UNIT, and append /\fIstring\fP after the size.  Note that the size is only approximate; no individual scaling
is done for different characters.  Remember to escape special characters like *.
.TP
.B \-Sp
\fBp\fPoint.  No size needs to be specified (1 pixel is used).
.TP
.B \-Ss
\fBs\fPquare.  Give side in UNIT.
.TP
.B \-St
\fBt\fPriangle.  Give side in UNIT.
.TP
.B \-Sv
\fBv\fPector.  Direction (in degrees counterclockwise from horizontal) and length (in UNIT) must be found in columns 3 and 4.  \fIsize\fP,
if present, will be interpreted as arrowwidth/headlength/headwidth (in UNIT) [Default is PARAMS UNIT].
By default arrow attributes remains invariant to the length
of the arrow.  To have the size of the vector scale down with decreasing size,
append n\fPnorm\fP, where vectors shorter than \fInorm\fP will have their
attributes scaled by length/\fInorm\fP.
.TP
.B \-SV
Same as \fB\-Sv\fP, except azimuth (in degrees east of north) should be given instead of direction.  The azimuth will
be mapped into an angle based on the chosen map projection (\fB\-Sv\fP leaves the directions
unchanged.)
.TP
.B \-Sx
cross.  Give length in UNIT.
#include "explain_-U.txt"
#include "explain_-V.txt"
.TP
.B \-W
Set pen attributes.  [Defaults: width = 1, color = 0/0/0, texture = solid]. 
#include "explain_-XY.txt"
#include "explain_-t.txt"
#include "explain_-c.txt"
.SH EXAMPLES
To plot solid red circles (diameter = LEN_1 UNIT) at the positions listed in the file DSDP.xy on a
Mercator map at LEN_2 UNIT/degree of the area 150E to 154E, 18N to 23N, with tickmarks every 1 degree
and gridlines every 15 minutes, try:
.br
.sp
psxy DSDP.xy \fB\-R\fP150/154/18/23 OPT_1 \fB\-G\fP255/0/0 \fB\-B\fP1g15m | lpr
.br
.sp
To plot the xyz values in the file quakes.xyzm as circles with size given by the magnitude in the
4th column and color based on the depth in the third using the color palette cpt on a linear map, try
.br
.sp
psxy quakes.xyzm \fB\-R\fP0/1000/0/1000 OPT_2 \fB\-Sc\fP \fB\-C\fPcpt \fB\-B\fP200 > map.ps
.br
.sp
To plot the file trench.xy on a Mercator map, with white triangles with sides LEN_1 UNIT on the left side of the line, spaced every LEN_3 UNIT, use
.br
.sp
psxy trench.xy \fB\-R\fP150/200/20/50 OPT_3 \fB\-G\fP255 \fB\-L \-B\fP10 | lpr
.SH SEE ALSO
gmt, psbasemap, psxyz
#include "refs.i"
