Number of bins

Syntax: | `BIN\NBINS x xbin xcount n { xmin xmax }`
Defaults: | `xmin = min(x), xmax = max(x)`

By default, the bins are defined by their centers, given in vector `xbin`, which must be strictly monotonically increasing. If the `\NBINS` qualifier is used, the number of bins, `n`, is expected. A new vector, `xbin`, will be created which will have `n` elements. If the numbers `xmin` and `xmax` are not entered, they default to the minimum and maximum of vector `x`.

`xbin[i] = xmin + (i - 1/2)(xmax - xmin) = n` for `i = 1, 2, ..., n`.

Weights
Lagrange