.TH PSROSE l DATE
#ifdef SI
#define UNIT	cm
#define LEN_1	7.5
#define SCALE_1	\fB\-S\fP7.5
#define LEN_2	5
#define SCALE_2	\fB\-S\fP5
#else
#define UNIT	inch
#define LEN_1	3
#define SCALE_1	\fB\-S\fP3
#define LEN_2	2
#define SCALE_2	\fB\-S\fP2
#endif
.SH NAME
psrose \- Plot (length, azimuth) as windrose diagram or polar histogram (sector or rose diagram).
.SH SYNOPSIS
\fBpsrose\fP <\fIfile\fP> [ \fB\-A\fP\fIsector_width\fP[r] ] 
[ \fB\-B\fP\fItickinfo\fP ] [ \fB\-C\fP[\fImode-file\fP] ] [ \fB\-E\fP\fIazimuth/elevation\fP ] [ \fB\-F\fP\fIred/green/blue\fP ] [ \fB\-G\fP\fIfill\fP ] 
[ \fB\-H\fP ] [ \fB\-I\fP ] [ \fB\-K\fP ] [ \fB\-M\fP[\fIparameters\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] 
[ \fB\-R\fP\fIr0/r1/az_0/az_1\fP ] [ \fB\-S\fP\fIradial_scale\fP[n] ] [ \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\-Z\fP\fIscale\fP ] [ \fB\-c\fP\fIcopies\fP ] [ \fB\-:\fP ]
.SH DESCRIPTION
\fBpsrose\fP reads (length,azimuth) pairs from \fIfile\fP [or standard input] and
generates \fIPostScript\fP code that will plot a windrose diagram.  Optionally (with \fB\-A\fP), polar histograms
may be drawn (sector diagram or rose diagram).  Options include full circle and half circle plots.
The \fIPostScript\fP code is written to standard output. 
.TP
\fIfile\fP
Name of data file.  If no file is given, psrose will read standard input.
.SH OPTIONS
No space between the option flag and the associated arguments.
.TP
.B \-A
Gives the sector width in degrees for sector and rose diagram.  [Default 0 means windrose diagram].  Append r to draw
rose diagram instead of sector diagram.
#include "explain_-b.txt"
Remember that "x" here is radial distance and
"y" is azimuth.  The ylabel may be used to plot a figure caption.
.TP
.B \-C
Plot vectors showing the principal directions given in the \fImodes\fP file.  If no file is
given, compute and plot mean direction.
.TP
.B \-E
Sets the viewpoint's azimuth and elevation [180/90]
.TP
.B \-G
Selects color (r/g/b, each 0\-255) for sector infill [Default is black(0/0/0)].
#include "explain_-H.txt"
.TP
.B \-I
Inquire.  Computes statistics needed to specify useful \fB\-R\fP.  No plot is generated.
#include "explain_-K.txt"
.TP
.B \-M
Specify new arrow attributes tailwidth/headlength/headwidth/r/g/b to change
the appearance of arrows (Only if \fB\-C\fP is set).
#include "explain_-O.txt"
#include "explain_-P.txt"
.TP
.B \-R
Specifies the 'region' of interest in (r,azimuth) space.  r0 is 0, r1 is max length in units.  For azimuth, specify
-90/90 for half circle plot or 0/360 for full circle.
.TP
.B \-S
Specifies radius of circle in UNIT.  Append n to normalize input radii to go from 0 to 1.
#include "explain_-U.txt"
#include "explain_-V.txt"
.TP
.B \-W
Set pen attributes for sector outline or rose plot.  [Default is no outline].
#include "explain_-XY.txt"
.TP
.B \-Z
Multiply the data radii by \fIscale\fP.  E.g., use \fB\-Z\fP0.001 to convert your data from m to km [Default is no scaling].
#include "explain_-c.txt"
.TP
.B \-:
Input file has (azimuth,radius) pairs rather than the expected (radius,azimuth).
.SH EXAMPLES
To plot a half circle rose diagram of the data in the file fault_segments.az_r (containing
pairs of (azimuth, length in meters), using a 10 degree bin sector width,
on a circle of radius = LEN_1 UNIT, grid going out to radius = 150 km in steps of 25 km with a 30 degree
sector interval, radial direction annotated every 50 km, using a light blue shading (200/240/255) outlined
by a solid red pen (width = 3), draw the mean azimuth, and shown in Portrait orientation, try:
.br
.sp
psrose fault_segments.az_r \fB\-R\fP0/150/-90/90 \fB\-B\fP50g25:"Fault length":/g30:."Rose diagram":
SCALE_1 \fB\-A\fP10r \fB\-G\fP200/240/255 \fB\-W\fP3/255/0/0 \fB\-Z\fP0.001 \fB\-C\fP \fB\-P\fP \fB\-:\fP | lpr
.br
.sp
To plot a full circle wind rose diagram of the data in the file lines.r_az, on a circle of radius = LEN_2 UNIT, 
grid going out to radius = 500 units in steps of 100 with a 45 degree sector interval, using a solid pen (width = 2), 
and shown in landscape [Default] orientation with UNIX timestamp and command line plotted, try:
.br
.sp
psrose lines.az_r \fB\-R\fP0/500/0/360 SCALE_2 \fB\-B\fPg100/g45:."Windrose diagram": \fB\-W\fP2 \fB\-U\fPc | lpr
.SH BUGS
No default radial scale and grid settings for polar histograms.  User must run \fBpsrose \-I\fP to find max length in
binned data set.
.SH SEE ALSO
gmt, gmtdefaults, pshistogram
#include "refs.i"
