hist
Installation
SKILL.md
Hist
Overview
Use this skill to build and manipulate hist.Hist objects, choose axis/storage types, fill with data and weights, and produce publication-style plots with mplhep styles, all based on matplotlib.
Quick start
- Create histograms with
Hist.newplus axis builders (Reg,Var,StrCat) and finish with exactly one storage (Int64orWeight). - Make sure axis labels contain a short variable name and units. Histogram titles should contains a slightly longer concise description of what data went into the plot.
- Fill with
.fill(...)using axis names; note that.fillreturnsNone. - Slice or project with UHI indexing (e.g.,
h.project("x")orh[{"x": 5j}]). - Plot with
hist.plot(...)ormplhep.hist2dplot(...); useplt.style.use(hep.style.ATLAS)for HEP-style plots.