>  Docs Center  >  Libraries  >  Markwardt  >  OPLOTBIN
Libraries

OPLOTBIN

OPLOTBIN

Name


  PLOTBIN

Author


  Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
  craigm@lheamail.gsfc.nasa.gov

Purpose


  Overlays a plot in histogram style on the current graphics viewport.

Calling Sequence


  OPLOTBIN, x, y, WIDTH=width, PIXCENTER=pixcenter, LOGCLIP=logclip, ...

Description



  OPLOTBIN overlays an unfilled histogram plot on an existing
  graphics window. The width of each histogram bin can be specified
  individually, and the alignment of the bin centers can be given
  explicitly.
  OPLOTBIN accepts several specialized keyword parameters of its
  own, but passes any other keywords to the built-in IDL OPLOT
  procedure. Thus, any keywords accepted by OPLOT can be passed to
  OPLOTBIN.

Inputs



  X, Y - Two arrays which give the "X" and "Y" position of each bin.
          If only the Y values are given, then the X values will be
          the bin numbers.

Optional Inputs


  NONE

Input Keyword Parameters



  WIDTH - The width of each histogram bin. If a scalar, then the
          width is assumed to be the same for all histogram bins.
          If a vector, then WIDTH should have the same number of
          elements as X and Y, and specify the width of each
          individual bin.
          Default value: width is the separation between the first
                          two X values.
  PIXCENTER - Describes the alignment of "X" values with respect to
              the histogram bin centers:
                  PIXCENTER = 0.0 -- "X" values are left edges of bins
                            = 0.5 -- "X" values are bin centers
                            = 1.0 -- "X" values are right edges of bins
              Intermediate values are also permitted.
              Default value: 0.5 ("X" values are bin centers)
  MIDPOINT - if set, then ignore the WIDTH and PIXCENTER keyword
              values, and instead construct bin edges which lie at
              the midpoints between data points. This is usually the
              most straightforward way to connect irregularly sampled
              points "like a histogram," although at the expense of
              not having a direct relation between X and the bin
              centers.
  EDGE - if set, then the X values will be taken to be the bin edges
          rather than the bin midpoints. In this case, the number of
          X values should be one more than the number of Y values.
  PLOTVERT - plot "vertically", that is, X is vertical and Y is
              horizontal.
  LOGCLIP - If set, then Y values are clipped to the current data
            viewport. On a logarithmic scale, this may help some
            negative bins be seen.
            Default: not set.

Outputs


  NONE

Example


Modification History


  Written, CM, 1997
  Documented, CM, July 1999
  Added MIDPOINT keyword, 21 Feb 2000
  Added EDGE keyword, 21 Apr 2000
  Corrected way that PIXCENTER works, same as PLOTBIN, just one year
    later (Thanks to J. Guerber), CM, 17 Mar 2003
  Changed _EXTRA handling to use EXECUTE internally. Unfortunately
    makes it incompatible with VM version of IDL, 03 Aug 2003, CM
  Remove EXECUTE function, move to CALL_PROCEDURE, 23 Nov 2003, CM
  Add PLOTVERT keyword, 19 Apr 2004, CM



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us