Data.make_bins

Data.make_bins(xcol, bins, mode='lin', **kargs)

Generate bin boundaries and centres along an axis.

Parameters
  • xcol (index) – Column of data with X values

  • bins (1d_)array or int or float) – Number of bins (int) or width of bins (if float)

  • mode (string) – “lin” for linear binning, “log” for logarithmic binning.

Keyword Arguments
  • bin_start (float) – Override minimum bin value

  • bin_stop (float) – Override the maximum bin value

Returns

(tuple of 4 arrays) – bin_start,bin_stop,bin_centres (1D arrays): The locations of the bin boundaries and centres for each bin.