Hello,
I am trying to built a TH2 using the TH2Poly class.
I am starting with a simple case, ie I try to define a square bin with a TPolyLine and fill it:
TH2Poly* h2pol = new TH2Poly("p2","p2",0,4,0,4);
Double_t x[5] = {0.,0.,2.,2.,0.};
Double_t y[5] = {0.,2.,2.,0.,0.};
TPolyLine *pline = new TPolyLine(5,x,y);
cout<<h2pol->AddBin(pline)<<endl;
h2pol->Fill(1.,1.,3);
h2pol->Draw("");
But the p2 histogram is not filled.
Any suggestions?
Thanks in advance,
Anna