15 gStyle->SetOptStat(0);
16 auto c1 =
new TCanvas(
"c1",
"A ratio example");
17 auto h1 =
new TH1D(
"h1",
"h1", 50, 0, 10);
18 auto h2 =
new TH1D(
"h2",
"h2", 50, 0, 10);
19 auto f1 =
new TF1(
"f1",
"exp(- x/[0] )");
20 f1->SetParameter(0, 3);
21 h1->FillRandom(
"f1", 1900);
22 h2->FillRandom(
"f1", 2000);
25 h1->GetXaxis()->SetTitle(
"x");
26 h1->GetYaxis()->SetTitle(
"y");
27 auto rp =
new TRatioPlot(h1, h2);
30 rp->GetLowYaxis()->SetNdivisions(505);