Hello everyone,
I am trying to remove the statistics box of an efficiency graph. gStyle->SetOptFit(0) does not work. I have also tried to manipulate the box while running root interactively but I can not grab the box or do anything to it. How can I do this?
Thanks,
Jose.
P.S. Here is a snippet of the code I use to make the attached figure:
TEfficiency* pEff = 0;
if (TEfficiency::CheckConsistency(*h_pass,*h_tot)) {
pEff = new TEfficiency(*h_pass,*h_tot);
}
pEff->Draw();
gStyle->SetOptStat(0);
gStyle->SetOptFit(0);
TF1* f1 = new TF1("f1","pol0",0,50);
f1->SetLineWidth(3);
pEff->Fit(f1);
pEff->SetStatisticOption(TEfficiency:: kFCP);
pEff->Draw();
gPad->Update();
pEff->GetPaintedGraph()->GetYaxis()->SetTitle("Efficiency");
pEff->GetPaintedGraph()->SetMinimum(0.75);
pEff->GetPaintedGraph()->SetMaximum(1.05);
pEff->GetPaintedGraph()->GetXaxis()->SetTitle("N_{PV}");
pEff->SetMarkerStyle(20);
pEff->SetMarkerSize(1.4);
cout << "Making the text" << endl;
pEff->Write();
pEff->Draw("ap");
tl->SetTextSize(0.04);
cout << "after setting text size" << endl;
tl->DrawLatex(0.18, 0.91, Form("Prob = %4.3f",
f1->GetProb()));
tl->DrawLatex(0.45, 0.91, Form("Cut = %5.4f", cut));
tl->SetTextSize(0.05);
tl->DrawLatex(0.25, 0.82, Form("#chi^{2}/dof = %3.1f/%i",
f1->GetChisquare(),
f1->GetNDF()));
c0->SaveAs(Form("%s/effVsNpv-%s-%s-%s-%s-0_%d.pdf", fDirectory.c_str(), fFile.c_str(), dir, chan, var, static_cast<int>(100.*cut)));