Skip to content

rootfig

Publication-quality figures straight from ROOT trees, without ROOT.

import rootfig as rf

rf.plot("events.root", "Muon_pt", tree="events", selection="Muon_pt > 20", bins=50)

rootfig is the TTree::Draw workflow for the Scientific Python HEP stack. It reads with uproot, computes with Awkward Array, fills hist histograms and draws with mplhep, and adds the glue those libraries leave to you: predictable per-event/per-object selection semantics, weights, shared binning across samples, normalisation, ratio panels and good defaults.

Stacked simulation with data and a ratio panel Stacked simulation with data and a ratio panel