Hi rooters,
I need some help: how can I make a 3D graph with “surf” option? The only method that I found is creating a tree and draw it into a TH3F, but the only option that works is “iso”: all the others return a scatter-plot. These are some lines of my code:
…
c1=new TCanvas(“c1”, “flussi in piano z0”, 200,10,600,400);
c1->cd();
gPad->SetGridx();
gPad->SetGridy();
TH3F*hist=new TH3F(“hist”,“piano 0”,31,-15,15,5,0,5,155,3.2e9,4.3e9);
Int_t nentries=(Int_t) t1->GetEntries();
for (Int_t i=0; i<nentries; i++) {
t1->GetEntry(i);
hist->Fill(px,py,pz);
hist->SetFillColor(kBlue);
t1->Draw(“pz:py:px>>hist”,"",“iso”);
}
…
I have also triede to re-draw the histogram:
hist->Draw(“surf”);
but it gives me back the scatter plot.
Could anyone help me?
Thank you very much.
Silva Bortolussi.