NAME
pshistogram - Bin data and plot histograms
SYNOPSIS
pshistogram file -Jxxscale[/yscale] -Wbin_width [ -2 ] [ -
Btickinfo ] [ -C ] [ -Eazimuth/elevation ] [ -Gfill ] [ -H ]
[ -I ] [ -K ] [ -Lpen ] [ - O ] [ - P ] [ - Q ] [ -
Rwest/east/south/north[r] ] [ -S ] [ -U[/dx/dy/][label] ] [
-V ] [ -Xx-shift ] [ -Yy-shift ] [ -Ztype ] [ -ccopies ]
DESCRIPTION
pshistogram reads the first column from file [or standard
input] and calculates histogram parameters based on the
bin-width provided. Using these parameters, scaling, and
optional range parameters it will generate PostScript code
that plots a histogram. A cumulative histogram may also be
specified.
file Input filename. If no file is given, pshistogram will
read standard input.
-Jx xscale[/yscale] (Linear scale(s) in inch/unit).
-W Sets the bin width used for histogram calculations.
OPTIONS
No space between the option flag and the associated argu-
ments.
-B Sets map boundary tickmark intervals. See psbasemap
for details.
-2 Read second rather than first column.
-C Center bin on each value. [Default is left edge].
-E Sets the viewpoint's azimuth and elevation (for per-
spective view) [180/90]
-G Select filling of bars. Set the shade (0 - 255) or
color (r/g/b) [Default is 0/0/0].
-H Input file(s) has Header record(s). Number of header
records can be changed by editing your .gmtdefaults
file. If used, GMT default is 1 header record.
-K More PostScript code will be appended later [Default
terminates the plot system].
-L Draw bar outline using the specified pen thickness.
[Default is no outline].
-O Selects Overlay plot mode [Default initializes a new
plot system].
- P Selects Portrait plotting mode [GMT Default is
Landscape, see gmtdefaults to change this].
-Q Draw a cumulative histogram.
-R west, east, south, and north specify the Region of
interest. To specify boundaries in degrees and minutes
[and seconds], use the dd:mm[:ss] format. Append r if
lower left and upper right map coordinates are given
instead of wesn. If not given, pshistogram will
automatically find reasonable values for the region.
-S Draws a stairs-step diagram instead of histogram.
-U Draw Unix System time stamp on plot. User may specify
where the lower left corner of the stamp should fall on
the page relative to lower left corner of plot in inch
[Default is (-0.75,-0.75)]. Optionally, append a
label, or c (which will plot the command string.)
-V Selects verbose mode, which will send progress reports
to stderr [Default runs "silently"].
-X -Y
Shift origin of plot by (x-shift,y-shift) inch
[Default is (1,1) for new plots, (0,0) for overlays].
-Z Choose between 6 types of histograms: 0 = counts
[Default], 1 = frequency_percent, 2 = log (1.0 +
count), 3 = log (1.0 + frequency_percent), 4 = log10
(1.0 + count), 5 = log10 (1.0 + frequency_percent).
-c Specifies the number of plot copies. [Default is 1]
EXAMPLES
To draw a histogram of the data v3206.t containing seafloor
depths, using a 250 meter bin width, center bars, and draw
bar outline, try:
pshistogram v3206.t -JXh -W250 -C -L2 -V > plot.ps
If you know the distribution of your data, you may expli-
citly specify range and scales. E.g., to plot a histogram
of the y-values (2nd column) in the file errors.xy using a 1
meter bin width, plot from -10 to +10 meters @ 0.3 inch/m,
annotate every 2 m and 100 counts, and use black bars, try:
cut -f2 errors.xy | pshistogram -W1 -R-10/10/0/0 -Jx0.3/0.01
-B2:Error:/100:Counts: -G0 -V > plot.ps
Since no y-range was specified, pshistogram will calculate
ymax in even increments of 100.
SEE ALSO
gmt, psbasemap, psrose, psxy
REFERENCES
Wessel, P., and W. H. F. Smith, 1995, The Generic Mapping
Tools (GMT) version 3.0 Technical Reference & Cookbook,
SOEST/NOAA.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released,
http://www.agu.org/eos_elec/95154e.html, Copyright 1995 by
the American Geophysical Union.
Wessel, P., and W. H. F. Smith, 1991, Free Software Helps
Map and Display Data, EOS Trans. AGU, 72, p. 441.