uproot.behaviors.RooHist.RooHist — Uproot documentation

# uproot.behaviors.RooHist.RooHist

Defined in uproot.behaviors.RooHist on line 19.

Inheritance order:
uproot.behaviors.TGraphAsymmErrors.TGraphAsymmErrors

class uproot.behaviors.RooHist.RooHist

  Behavior for `RooHist`.

  This consists of `to_boost` (and `to_hist`) and `to_numpy` providing access to the histogram.

## name

RooHist.name

  The name of the histogram.

## title

RooHist.title

  The title of the histogram.

## to_numpy

RooHist.to_numpy(dd=False)
  Parameters:

    dd (bool) – If True, the return type follows numpy.histogramdd; otherwise, it follows numpy.histogram and numpy.histogram2d.

  Converts the `RooHist` into a form like the ones produced by the NumPy histogram functions.

## to_boost

RooHist.to_boost()

  Converts `RooHist` into a `boost-histogram` object.

## to_hist

RooHist.to_hist()

  Converts `RooHist` into a `hist` object.

## values

Inherited from uproot.behaviors.TGraphAsymmErrors.TGraphAsymmErrors.

RooHist.values(axis='both')
  Parameters:

    axis (int or str) – If `0`, `-2`, or `"x"`, get the x axis. If `1`, `-1`, or `"y"`, get the y axis. If `"both"`, get `"x"` and `"y"` axes as a 2-tuple.

  Returns the values of all points in the scatter plot, either as a 1-dimensional NumPy array (if `axis` selects only one) or as a 2-tuple (if `axis="both"`).

## errors

Inherited from uproot.behaviors.TGraphAsymmErrors.TGraphAsymmErrors.

RooHist.errors(which, axis='both')
  Parameters:

    - which (str) – If `"low"` or `"high"`, get the low-side or high-side error. If `"mean"`, get the average. If `"diff"`, get their difference.

    - axis (int or str) – If `0`, `-2`, or `"x"`, get the x axis. If `1`, `-1`, or `"y"`, get the y axis. If `"both"`, get `"x"` and `"y"` axes as a 2-tuple.

  Returns the errors in all points in the scatter plot, either as a 1-dimensional NumPy array (if `axis` selects only one) or as a 2-tuple (if `axis="both"`). The value of `which` does not affect the return type.