Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.
ROOT Version: 6.30 Platform: win10 Compiler: vc++
In the Divided TCanvas, How can I change the stats respectively, for example, remove the Entries?
to your macro (see the options in the Documentation). Note that it affects all pads, cannot be set for each histogram. If you want different for each one, you can create your own stats boxes or edit “by hand” (see here).
{
gStyle->SetOptStat(1101);
auto c1 = new TCanvas("c1","c1",900,450);
c1->Divide(2,1);
c1->cd(1);
auto h1 = new TH2F("h1","H 1",20,-4,4,20,-20,20);
h1->SetLineColor(kRed);
float px, py;
for (Int_t i = 0; i < 25000; i++) {
gRandom->Rannor(px,py);
h1->Fill(px,5*py);
h1->Fill(3+0.5*px,2*py-10.,0.1);
}
h1->Draw("COLZ");
c1->cd(2);
auto h2 = new TH2F("h2","H 2",20,-4,4,20,-20,20);
for (Int_t i = 0; i < 15000; i++) {
gRandom->Rannor(px,py);
h2->Fill(px,5*py);
h2->Fill(3+0.5*px,2*py-10.,0.1);
}
h2->Draw("COLZ");
}
I mean how add “test = 10” in a divided TCanvas(for example, divide(2,1))?
I can add "test = 10 " in a single TCanvas(No divided).
But I don’t know how to do it in divided TCanvas.