Hi everyone,
It looks like the TH1::SetOption()
Method is not working when called from a TH3D Instance. Here is the way to reproduce it:
Double_t px, py, pz;
TH3F *hd3 = new TH3F("hd3","hd3",10,0.,1.,10,0,1,5,.0,1.);
for (Int_t i = 0; i < 50000; i++) {
px = gRandom->Gaus(0.5,0.2);
py = gRandom->Gaus(0.5,0.2);
pz = (px + py)/2.;
hd3->Fill(px, py, pz);
}
hd3->SetOption("BOX2 Z")
hd3->Draw();
It works fine with other instances though:
Double_t px, py;
TH2D *hd2 = new TH2D("hd2","hd2",10,0.,1.,10,0,1);
for (Int_t i = 0; i < 50000; i++) {
px = gRandom->Gaus(0.5,0.2);
py = gRandom->Gaus(0.5,0.2);
hd2->Fill(px, py);
}
hd2->SetOption("COLZ")
hd2->Draw();
I can send the option using Draw but actually I want to set BOX2 as the default option when saving the histogram to a ROOT file so it is drawn as BOX2 when using TBrowser.
Linux, ROOT 6.11/01
Best wishes,
Andres