hist.stack module#

class hist.stack.Stack(*args: hist.basehist.BaseHist)#

Bases: object

property axes: hist.axestuple.NamedAxesTuple#
classmethod from_dict(d: Mapping[str, BaseHist]) T#

Create a Stack from a dictionary of histograms. The keys of the dictionary are used as names.

classmethod from_iter(iterable: Iterable[BaseHist]) T#

Create a Stack from an iterable of histograms.

plot(*, ax: matplotlib.axes.Axes | None = None, **kwargs: Any) Any#

Plot method for Stack object.

project(*args: int | str) T#

Project the Stack onto a new axes.

show(**kwargs: Any) Any#

Pretty print the stacked histograms to the console.