[ROOT] Re: 3D-Histogram;options

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Oct 17 2001 - 16:17:08 MEST


Hi Ramni,

Here is an example. Use the X3D viewer to rotate the picture dynamically

Rene Brun

{
   gROOT->Reset();
   TH3F *h3a = new TH3F("h3a","testa fitz",20,-4,4,20,-4,4,20,0,20);
   TH3F *h3b = new TH3F("h3b","testb fitz",20,-4,4,20,-4,4,20,0,20);
   for (Int_t i=0;i<10000;i++) {
      Float_t x = gRandom->Gaus(0,1);
      Float_t y = gRandom->Gaus(0,1);
      Float_t z = gRandom->Gaus(10,4);
      h3a->Fill(x,y,z);
   }
   for (Int_t i=0;i<1000;i++) {
      Float_t x = gRandom->Gaus(0,1);
      Float_t y = gRandom->Gaus(0,1);
      Float_t z = gRandom->Gaus(10,4);
      h3b->Fill(x,y,z);
   }
   h3a->SetMarkerColor(kBlue);
   h3b->SetMarkerColor(kRed);
   h3a->Draw("box");      
   h3b->Draw("boxsame");      
}


ramni gupta wrote:
> 
> HELLO ROOTERS,
> 
> Could you please help me a 3D-histogram with the boxes. I need to plot a 3d
> plot  like that of a 2D lego histogram. I'm trying every option to Draw but
> everytime its giving points only. Is there hope to get the
> same with new versions of ROOt. I'm using 2.25 &3.01..........
> 
> Or should I try with Paw.
> 
> Thanks
> sincerly
> Ramni
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:03 MET