psrose — GMT 5.1.1 documentation

### Navigation

- index
- next
- previous
- Project Home »
- GMT 5.1.1 documentation »
- PS »
- Search:

# psrose

psrose - Plot a polar histogram (rose, sector, windrose diagrams)

## Synopsis

psrose [ table ] [ -A[r]*sector_width* ] [ -B[p|s]parameters ] [ -C[mode_file] ] [ -D ] [ -I ] [ -Gfill ] [ -I ] [ -K ] [ -L[wlabel/elabel/slabel/nlabel] ] [ -Mparameters ] [ -O ] [ -P ] [ -Rr0/r1/az_0/az_1 ] [ -S[n]*radial_scale* ] [ -T ] [ -U[just/dx/dy/][c|label] ] [ -V[level] ] [ -W[v]pen ] [ -X[a|c|f|r][x-shift[u]] ] [ -Y[a|c|f|r][y-shift[u]] ] [ -Zu|scale ] [ -bi[ncols][type][w][+L|+B] ] [ -ccopies ] [ -h[i|o][n][+c][+d][+rremark][+rtitle] ] [ -icols[l][sscale][ooffset][,...] ] [ -p[x|y|z]azim/elev[/zlevel][+wlon0/lat0[/z0]][+vx0/y0] ] [ -t[transp] ] [ -:[i|o] ]

Note: No space is allowed between the option flag and the associated arguments.

## Description

psrose reads (length,azimuth) pairs from file [or standard input] and generates PostScript code that will plot a windrose diagram. Optionally (with -A), polar histograms may be drawn (sector diagram or rose diagram). Options include full circle and half circle plots. The PostScript code is written to standard output. The outline of the windrose is drawn with the same color as MAP_DEFAULT_PEN.

## Required Arguments

None.

## Optional Arguments

table
  One or more ASCII (or binary, see -bi[ncols][type]) data table file(s) holding a number of data columns. If no tables are given then we read from standard input. If a file with only azimuths are given, use -i to indicate the single column with azimuths; then all lengths are set to unity (see -Zu to set actual lengths to unity as well).
-A[r]*sector_width*
  Gives the sector width in degrees for sector and rose diagram. [Default 0 means windrose diagram]. Use -Ar to draw rose diagram instead of sector diagram.

-B[p|s]parameters (more ...)
  Set map boundary intervals.

Remember that “x” here is
radial distance and “y” is azimuth. The ylabel may be used to plot a figure caption.

-C[mode_file]
  Plot vectors showing the principal directions given in the modes file. If no file is given, compute and plot mean direction. See -M to control vector attributes.
-D
  Shift sectors so that they are centered on the bin interval (e.g., first sector is centered on 0 degrees).
-F
  Do not draw the scale length bar [Default plots scale in lower right corner]
-Gfill
  Selects shade, color or pattern for filling the sectors [Default is no fill].
-I
  Inquire. Computes statistics needed to specify useful -R. No plot is generated.

-K (more ...)
  Do not finalize the PostScript plot.
-L[wlabel/elabel/slabel/nlabel]
  Specify labels for the 0, 90, 180, and 270 degree marks. For full-circle plot the default is WEST/EAST/SOUTH/NORTH and for half-circle the default is 90W/90E/-/0. A - in any entry disables that label. Use -L with no argument to disable all four labels
-Mparameters
  Used with -C to modify vector parameters. For vector heads, append vector head size [Default is 0, i.e., a line]. See VECTOR ATTRIBUTES for specifying additional attributes.

-O (more ...)
  Append to existing PostScript plot.

-P (more ...)
  Select “Portrait” plot orientation.
-Rr0/r1/az_0/az_1
  Specifies the ’region’ of interest in (r,azimuth) space. r0 is 0, r1 is max length in units. For azimuth, specify either -90/90 or 0/180 for half circle plot or 0/360 for full circle.
-S[n]*radial_scale*
  Specifies radius of circle. Use -Sn to normalize input radii to go from 0 to 1.
-T
  Specifies that the input data is orientation data (has a 180 degree ambiguity) instead of true 0-360 degree directions [Default].

-U[just/dx/dy/][c|label] (more ...)
  Draw GMT time stamp logo on plot.

-V[level] (more ...)
  Select verbosity level [c].
-Wpen
  Set pen attributes for sector outline or rose plot. [Default is no outline]. Use -Wvpen to change pen used to draw vector (requires -C) [Default is same as sector outline].

-X[a|c|f|r][x-shift[u]]

-Y[a|c|f|r][y-shift[u]] (more ...)
  Shift plot origin.
-Zscale
  Multiply the data radii by scale. E.g., use -Z0.001 to convert your data from m to km. To exclude the radii from consideration, set them all to unity with -Zu [Default is no scaling].
-:
  Input file has (azimuth,radius) pairs rather than the expected (radius,azimuth).

-bi[ncols][type] (more ...)
  Select binary input. [Default is 2 input columns].

-ccopies (more ...)
  Specify number of plot copies [Default is 1].

-h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
  Skip or produce header record(s).

-icols[l][sscale][ooffset][,...] (more ...)
  Select input columns.

-p[x|y|z]azim/elev[/zlevel][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
  Select perspective view.

-t[transp] (more ...)
  Set PDF transparency level in percent.

-^
  Print a short message about the syntax of the command, then exits (NOTE: on Windows use just -).
+
  Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exits.
-?
  Print a complete usage (help) message, including the explanation of options, then exits.
--version
  Print GMT version and exit.
--show-datadir
  Print full path to GMT share directory and exit.

## Vector Attributes

Several modifiers may be appended to the vector-producing options to specify the placement of vector heads, their shapes, and the justification of the vector:

> +aangle sets the angle of the vector head apex [30].

> +b places a vector head at the beginning of the vector path [none].

> +e places a vector head at the end of the vector path [none].

> +g-|fill turns off vector head fill (if -) or sets the vector head fill [Default fill is used, which may be no fill].

> +l draws half-arrows, using only the left side [both].

> +nnorm scales down vector attributes (pen thickness, head size) with decreasing length, where vectors shorter than norm will have their attributes scaled by length/norm [arrow attributes remains invariant to length].

> +oplon/plat specifies the oblique pole for the great or small circles. Only needed for great circles if +q is given.

> +p[-][pen] sets the vector pen attributes. If pen has a leading - then the head outline is not drawn. [Default pen is used, and head outline is drawn]

> +q means the input angle, length is instead the start and stop opening angles of the arc segment relative to the point.

> +r draws half-arrows, using only the right side [both].

In addition, all but circular vectors may take these modifiers:

> +jjust determines how the input x,y point relates to the vector. Choose from beginning [default], end, or center.

> +s means the input angle, length is instead the x, y coordinates of the vector end point.

## 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 = 3 inch, 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 outlined by a solid red pen (width = 0.75 points), draw the mean azimuth, and shown in Portrait orientation, use:

>     gmt psrose fault_segments.az_r -R0/150/-90/90 -B50g25:"Fault
>                length":/g30:."Rose diagram":-S3i -Ar10 -Glightblue
>                -W0.75p,red -Z0.001 -C -P -T -: > half_rose.ps

To plot a full circle wind rose diagram of the data in the file lines.r_az, on a circle of radius = 5 cm, grid going out to radius = 500 units in steps of 100 with a 45 degree sector interval, using a solid pen (width = 0.5 point, and shown in landscape [Default] orientation with UNIX timestamp and command line plotted, use:

>     gmt psrose lines.az_r -R0/500/0/360 -S5c -Bg100/g45:."Windrose diagram": -W0.5p -Uc | lpr

## Bugs

No default radial scale and grid settings for polar histograms. User must run psrose -I to find max length in binned data set.

## See Also

gmt, gmt.conf, gmtcolors, pshistogram

### Navigation

- index
- next
- previous
- Project Home »
- GMT 5.1.1 documentation »
- PS »
- Search: