[ROOT] Problems with update of surface histograms

From: Reiner Rohlfs (Reiner.Rohlfs@obs.unige.ch)
Date: Mon Feb 11 2002 - 18:23:36 MET


Dear Root Team,

The macro below demonstrates that the Z - coordinate is not updated when the
values of the histograms have changed. It works fine with draw option "colz"
but not with draw option "surf1"

This was OK until version 3.00/06, but now we have updated to version 3.02/07
and now we see this problem.

Is there a work around, a function to recalculate the Z - axis?

Thanks Reiner.



{
   gROOT->Reset();

   TCanvas * canvas = new TCanvas("bug", "bug", 100, 100, 500, 500);

   hist = new TH2D("SPI", "", 10, 5, 10,  10, 0, 10);

   for (int x = 0; x < 10; x++)
      for (int y = 0; y < 10; y++)
         hist->Fill(x,y, x *y);

//   hist->Draw("colz");
   hist->Draw("surf1");

   canvas->Update();

   hist->Scale(2);
   canvas->Modified();
   canvas->Update();

   
}



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET