Example of macro illustrating how to superimpose two histograms with different scales in the "same" pad.
Inspired by work of Rene Brun.
Q
import mplhep as hep
import numpy as np
import ROOT
h1 =
ROOT.TH1F(
"h1",
"my histogram", 100, -3, 3)
hep.histplot(h1, ax=ax1, histtype=
"fill", color=
"white", edgecolor=
"blue", linewidth=1.5, alpha=0.5)
hint1 =
ROOT.TH1F(
"hint1",
"h1 bins integral", 100, -3, 3)
hep.histplot(hint1, ax=ax2, histtype=
"errorbar", color=
"red", marker=
"+", markersize=3)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Date
- July 2025
- Author
- Alberto Ferro, Nursena Bitirgen
Definition in file hist010_TH1_two_scales_uhi.py.