Please see functions fixedWidthBins and variableWidthBins for further details.
fixedWidthBins
variableWidthBins