13 gStyle->SetOptStat(0);
14 auto c1 =
new TCanvas(
"c1",
"fit residual simple");
15 gPad->SetFrameFillStyle(0);
16 auto h1 =
new TH1D(
"h1",
"h1", 50, -5, 5);
17 h1->FillRandom(
"gaus", 5000);
18 TFitResultPtr fitres = h1->Fit(
"gaus",
"S0");
20 h1->GetXaxis()->SetTitle(
"x");
21 h1->GetYaxis()->SetTitle(
"y");
22 auto rp1 =
new TRatioPlot(h1,
"errfunc");
23 rp1->SetGraphDrawOpt(
"L");
24 rp1->SetSeparationMargin(0.0);
26 rp1->GetLowerRefGraph()->SetMinimum(-2);
27 rp1->GetLowerRefGraph()->SetMaximum(2);