# Variable size binning in 2D

is it possible to make a 2D histogram with a variable size binning for x and y, but x needs to have a variable size binning per each row of x bins?
I have this example for a set of lines for x and y:

``````  for (Int_t i = 0; i<npsis ; i++){
//cout <<(TMath::ATan(tt[i]))*180/Pi<<endl;
TLine *top1 = new TLine(-180,(TMath::ATan(tt[i]))*180/Pi,180,(TMath::ATan(tt[i]))*180/Pi);
top1->SetLineColor(kRed);
top1->Draw();
}

Double_t ini=0;
for (Int_t j = 0; j<npsis-1 ; j++){
Double_t pans=ttil[j];
for (Int_t i = ini; i<ini+pans ; i++){
//      cout << ll[i]*180/Pi <<endl;
if (TMath::Abs(ll[i]) > Pi){ ll[i] = ll[i]-2*Pi;}
TLine *large1 = new TLine(ll[i]*180/Pi,(TMath::ATan(tt[j+1]))*180/Pi,ll[i]*180/Pi,(TMath::ATan(tt[j]))*180/Pi);
large1->SetLineColor(kRed);
large1->Draw();
}
ini=ini+pans;
}

TLine *last1 = new TLine(ll[120]*180/Pi,(TMath::ATan(tt[9]))*180/Pi,ll[120]*180/Pi,-90);
last1->SetLineColor(kRed);
last1->Draw();
TLine *last2 = new TLine(ll[121]*180/Pi,(TMath::ATan(tt[9]))*180/Pi,ll[121]*180/Pi,-90);
last2->SetLineColor(kRed);
last2->Draw();
``````

I want each red cell as a bin of a 2D histogram in order to fill it with some calculations.

Sorry, I forgot to attach the figure.
panel.pdf (4.48 KB)