NAME

     pshistogram - Bin data and plot histograms


SYNOPSIS

     pshistogram file -Jxxscale[/yscale] -Wbin_width [ -2 ] [  -A
     ] [ -Btickinfo ] [ -C ] [ -Eazimuth/elevation ] [ -Gfill ] [
     -H[nrec] ] [ -I[o] ] [ -K ] [ -Lpen ] [ -O ] [ -P ] [ -Q ] [
     -Rwest/east/south/north[r] ] [ -S ] [ -U[/dx/dy/][label] ] [
     -V ] [ -Xx-shift ] [ -Yy-shift ] [ -Ztype ] [ -ccopies  ]  [
     -bi[s][n] ]


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 ASCII [or binary, see  -b]  datafile.  If  no  file  is
          given, pshistogram will read standard input.

     -Jx  xscale[/yscale] (Linear scale(s) in distance  unit/data
          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.

     -A   Plot the histogram horizontally from x = 0 [Default  is
          vertically from y = 0].

     -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.  [Default is no fill].  Specify
          the  shade (0-255) or color (r/g/b), or -Gpdpi/pattern,
          where pattern gives the number of the built-in  pattern
          (1-90)  OR  the  name of a Sun 1-, 8-, or 24-bit raster
          file.  dpi sets the resolution of the image.  For 1-bit
          rasters:   use   -GP   for  inverse  video,  or  append
          :Fr/g/b[B[r/g/b]]  to  specify  fore-  and   background
          colors  (use  r/g/b  =  -  for  transparency).  See GMT
          Cookbook & Technical Reference Appendix E for  informa-
          tion on individual patterns.

     -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.

     -I   Inquire about min/max x and y after binning.  No  plot-
          ting is done.  Append o to output an ASCII table of the
          resulting x,y data.

     -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.
          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).   Prepend  a
          for  absolute  coordinates;  the default (r) will reset
          plot origin.

     -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]

     -bi  Selects binary input.  Append s  for  single  precision
          [Default  is  double].   Append  n  for  the  number of
          columns in the binary file(s).   [Default  is  2  input
          columns].


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 -L0.5p -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.75 cm/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.75c/0.01c -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(l), psbasemap(l), psrose(l), psxy(l)