# Quick Start¶

## Core pygram11 Functions¶

pygram11 provides a simple set of functions for calculating histograms:

 pygram11.fix1d(x[, bins, range, weights, …]) Calculate a histogram for one dimensional data with fixed bin widths pygram11.fix1dmw(x, weights[, bins, range, …]) Calculate fixed width 1D histograms with multiple weight variations pygram11.var1d(x, bins[, weights, density, …]) Calculate a histogram for one dimensional data with variable bin widths pygram11.var1dmw(x, weights, bins[, flow, omp]) Calculate variable width 1D histograms with multiple weight variations pygram11.fix2d(x, y[, bins, range, weights, omp]) histogram the x, y data with fixed (uniform) binning in two dimensions over the ranges [xmin, xmax), [ymin, ymax). pygram11.var2d(x, y, xbins, ybins[, …]) histogram the x and y data with variable width binning in two dimensions over the range [xbins[0], xbins[-1]), [ybins[0], ybins[-1])

You’ll see that the API specific to pygram11 is a bit more specialized than the NumPy histogramming API (shown below).

Histogramming a normal distribution:

>>> h, err = pygram11.fix1d(np.random.randn(10000), bins=25, range=(-3, 3))


See the API reference for more examples.

## NumPy-like Functions¶

For convenience a NumPy-like API is also provided (not one-to-one, see the API reference).

 pygram11.histogram(x[, bins, range, …]) Calculate a histogram for one dimensional data. pygram11.histogram2d(x, y[, bins, range, …]) Compute the two-dimensional histogram for the data (x, y).