Lower bound on log axes

Hi,

Using this bit of code on ROOT 6.03/03 :

{
  TNtuple* nt = new TNtuple("nt","","a:b:c");
  TCanvas *Can = new TCanvas("Can","Can",200,10,600,400);
  
  Double_t x[16] =  {1.00, 2.00, 6.00, 7.00, 3.00, 10.00, 0.20, 5.55,
           20.50, 9.75, 1.50, 8.00, 5.00, 0.95, 3.85, 8.70};
  Double_t y[16] = {1.00, 2.00, 6.00, 7.00, 3.00, 10.00, 0.20, 5.55,
          20.50, 9.75, 1.50, 8.00, 5.00, 0.95, 3.85, 8.70};
  Double_t z[16] = {0.001, 2.50, 600.00, 0.00001, 30.00, 10.001, 300000.0, 500000.55,
          20.50, 9.75, 280000.50, 8.00, 5.00, 0.95, 3.85, 8.70};
  
  Double_t x3, y3, z3;
  
  for(Int_t h1 =0;h1<16;++h1)
    {
      x3 = x[h1];
      y3 = y[h1];
      z3 = z[h1]; nt->Fill(x3,y3,z3);
    }
  Can->SetTickx(1);
  gStyle->SetOptStat(0);
  gStyle->SetPalette(1,0);
  nt->SetMarkerStyle(20);
  nt->SetMarkerSize(1);
  
#if 0 /* 0 or 1 */
  Double_t xmin = 0.01, xmax = 50, ymin = 0.01, ymax = 50;
#else /* 0 or 1 */
  nt->SetEstimate(nt->GetEntries() + 1);
  Double_t xmin = nt->GetMinimum("a"); // "a" is X in the nt->Draw below
  Double_t xmax = nt->GetMaximum("a");
  Double_t ymin = nt->GetMinimum("b"); // "b" is Y in the nt->Draw below
  Double_t ymax = nt->GetMaximum("b");
  xmin *= ((xmin < 0.0) ? 1.000001 : 0.999999);
  xmax *= ((xmax < 0.0) ? 0.999999 : 1.000001);
  ymin *= ((ymin < 0.0) ? 1.000001 : 0.999999);
  ymax *= ((ymax < 0.0) ? 0.999999 : 1.000001);
#endif /* 0 or 1 */
  
  // http://root.cern.ch/root/html/TTree.html#TTree:Draw@2
#if 1 /* 0 or 1 */
  TH2F *h = new TH2F("h", "h", 100, xmin, xmax, 100, ymin, ymax);
  nt->Draw("b:a:c>>h", "", "colz"); // warning: TTree::Draw destroys "h"
  // gPad->Modified(); gPad->Update();
  h->GetXaxis()->SetLimits(xmin, xmax); // restore proper "h" X axis limits
  h->GetYaxis()->SetLimits(ymin, ymax); // restore proper "h" Y axis limits
#else /* 0 or 1 */
  nt->Draw("b:a:c", "", "colz"); // note: TTree::Draw creates a "htemp"
  // gPad->Modified(); gPad->Update();
  // TH2F *htemp = ((TH2F *)(gPad->GetPrimitive("htemp")));
  htemp->GetXaxis()->SetLimits(xmin, xmax); // set proper "htemp" X axis limits
  htemp->GetYaxis()->SetLimits(ymin, ymax); // set proper "htemp" Y axis limits
#endif /* 0 or 1 */
  
  gPad->SetLogx(1);
  gPad->SetLogy(1);
  // gPad->Modified(); gPad->Update();
}

I found that I canā€™t get expected numbers in the plot when at least one of the coordinates is below 1e-45.
If I change in the piece of code above the loop by :

  for(Int_t h1 =0;h1<16;++h1)
    {
      x3 = 1e-48*x[h1];
      y3 = 1e-48*y[h1];
      z3 = 1e-48*z[h1]; nt->Fill(x3,y3,z3);
    }

I get ā€œError in THistPainter::TableInit: cannot set X axis to log scaleā€, meaning that the values are seen as equal to 0 and then putting log scale gives obviously an error.
Printing the variables in the loop show that they are not defined as 0, so at a given moment ROOT changes it to 0 but I donā€™t see where exactly.

Any ideas ?

Iā€™ll checkā€¦