Missing z-axis title of TEfficiency


ROOT Version: 6.16.00
Platform: Centos 6
Compiler: x86_64-slc6-gcc62-opt


Dear experts,

I’m trying this macro to see how TEfficiency works for 2D, adapt from the example given in TEfficiency class documenation:

{
   //canvas only needed for this documentation
   TCanvas* c1 = new TCanvas("example","",600,400);
   c1->SetRightMargin(0.2);
   c1->SetFillStyle(1001);
   c1->SetFillColor(kWhite);
   //create one-dimensional TEfficiency object with fixed bin size
   TEfficiency* pEff = new TEfficiency("eff","my efficiency;x;y;#epsilon",20,0,10,20,0,10);
   TRandom3 rand3;
   bool bPassed;
   double x;
   double y;
   for(int i=0; i<10000; ++i)
   {
      //simulate events with variable under investigation
      x = rand3.Uniform(10);
      y = rand3.Uniform(10);
      //check selection: bPassed = DoesEventPassSelection(x)
      bPassed = rand3.Rndm() < TMath::Gaus(x,5,4);
      pEff->Fill(bPassed,x,y);
   }
   pEff->Draw("colz");
   //only for this documentation
   return c1;
}

The problem is: the title of the Z-axis (color palette) is missing. Anything wrong with this script? How can I add a title for z-axis? Thanks.

According to the doc the z title is not mentioned. @moneta is there a reason for that ?

Indeed the Z title was not set correctly.
Now fixed in master

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.