Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
ratioplot5.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_hist
3 /// \notebook
4 /// Example that shows how you can set the colors of the confidence interval bands by using
5 /// the method `TRatioPlot::SetConfidenceIntervalColors`.
6 ///
7 /// \macro_image
8 /// \macro_code
9 ///
10 /// \author Paul Gessinger
11 
12 void ratioplot5() {
13  gStyle->SetOptStat(0);
14  auto c1 = new TCanvas("c1", "fit residual simple");
15  auto h1 = new TH1D("h1", "h1", 50, -5, 5);
16  h1->FillRandom("gaus", 2000);
17  h1->Fit("gaus","0");
18  h1->GetXaxis()->SetTitle("x");
19  h1->GetYaxis()->SetTitle("y");
20  auto rp1 = new TRatioPlot(h1);
21  rp1->SetConfidenceIntervalColors(kBlue, kRed);
22  rp1->Draw();
23 }