Surf1, surf2, etc options

Hi…if I write the code of the examples of this pages root.cern.ch/doc/master/classTHistPainter.html, as

{ TCanvas *c2 = new TCanvas("c2","c2",600,400); gStyle->SetPalette(kBird); TH2F *hsurf3 = new TH2F("hsurf3","Option SURF3 example ",30,-4,4,30,-20,20); Float_t px, py; for (Int_t i = 0; i < 25000; i++) { gRandom->Rannor(px,py); hsurf3->Fill(px-1,5*py); hsurf3->Fill(2+0.5*px,2*py-10.,0.1); } hsurf3->Draw("SURF3"); return c2; }

I’ve correct histograms as like in the examples…
if I open my root files and I draw TH2F using these options i’ve all black histograms…how is it possible? for example i digit

hallrxry->Draw("SURF2");

I’ve this

link to root file drive.google.com/open?id=0B9Me0 … 3phTDFWeDA

root [0] TFile *f = TFile::Open(“cors_plot-gammatot.root”)
root [1] hallrxry->Print()
TH1.Print Name = hallrxry, Entries= 0, Total sum= 0

sorry…I uploaded that file some days ago…and there wasn’t the hallrxry histogram…

But it is the same thing for other th2f as for example hhadrxry, hgamrxry, hneng etc…not only for hallrxry…I’ve black histograms… this is the new file drive.google.com/file/d/0B9Me0x … sp=sharing

Options “SURF”, “SURF1” and “SURF3” draw a “mesh” made of (thin) lines.
The problem with your histogram is that it has 1000 bins in X and Y directions, so the drawn “mesh” (one thin line for each bin in both directions) makes the whole picture completely “black”.
Try: { TFile *f = TFile::Open("cors_plot-gammatot.root"); TH2F *h; f->GetObject("hallrxry", h); TCanvas *c = new TCanvas("c", "c"); c->SetLogz(1); h->Draw("SURF2"); // "SURF2" or "SURF7" or "SURF4" }

Hi pepe, thanks! it works! so…do you think 1000 bin are a lot for an histogram?

It depends what you do with it. If you need it for your analysis then go for it. You just need to think a bit when you draw such histograms … 1000x1000 bins … on a 600x4000 canvas makes 2 bins per pixel ! … that explain the black picture you get … and some other representation are affected by this too … like BOX for instance…