general/misc/
histbins.pro
Routines
top source histbins
result = histbins(x, xbins, shift=shift, range=range, binsize=binsize, log=log, nbins=nbins, anbins=anbins, retbins=retbins, reverse=reverse, normalize=normalize, extend_range=extend_range)
FUNCTION: H=histbins(R,XBINS) Purpose: Returns the histogram (H) and bin locations (XBINS) for an array of numbers. Examples: r = randomn(seed,10000) plot,psym=10, xbins, histbins(r,xbins) ;Use all defaults. plot,psym=10, xbins, histbins(r,xbins ,/shift) ;shift bin edges. plot,psym=10, xbins, histbins(r,xbins, binsize=.2) plot,psym=10, xbins, histbins(r,xbins, binsize=.2 ,/shift) plot,psym=10, xbins, histbins(r,xbins, range=[-10,10]) NOTE: XBINS is an output, not an input! Keywords: (All optional) Defaults are based on the size and range of input. BINSIZE: Size of bins. (recommend double precision!) NBINS: force the output array to have this number of elements. (Use with RANGE) RANGE: Limits of histogram SHIFT : Keyword that controls the location of bin edges. This has no effect if RANGE is defined. NORMALIZE: Set keyword to return a normalized histogram (probability distribution). REVERSE: See REVERSE keyword for histogram RETBINS: If set then an array of bins (same size as r) is returned instead. EXTEND_RANGE: if set then the range is extended on either end, (no effect if range is set) See also: "average_hist", "histbins2d"
Parameters
- x
- xbins
Keywords
- shift
- range
- binsize
- log
- nbins
- anbins
- retbins
- reverse
- normalize
- extend_range
File attributes
Modification date: | Fri Nov 21 06:43:18 2014 |
Lines: | 41 |