Histogram with different binning

Dear experts,

I want to make a 2D histogram with different binning on the y axis.
I fellow: root.cern.ch/root/roottalk/roottalk00/2244.html
and I got the plot in cc.
As I expect most event to be btw 50 and 200 for the y axis, I’m not satisfy with the y axis because
I will not see anything. Do you know how I can make bin for:
{“15”, “20”, “22.5”, “25”, “27.5”, “30”, “35”, “40”, “45”, “50”, “60”, “80”, “120”, “200”, “500”, “3000” }
such that the “distance” along the y axis btw [15, 20], [20, 22.5], …, [500, 300] to be the same?

Regards

TH2D::TH2D(const char* name, const char* title, Int_t nbinsx, const Double_t* xbins, Int_t nbinsy, const Double_t* ybins)

Dear Pepe,

thank you for your reply but this does not do what I want, unless if I’m doing something wrong, I’m using [1]
then I got the plot in cc, but I want that the “distance” along the y axis btw [15, 20], [20, 22.5], …, [500, 300] to be the same. Do you know how I can achieve that?

Regards

[1]
double ptbin[] {15., 20., 22.5, 25., 27.5, 30., 35., 40., 45., 50., 60., 80., 120., 200., 500., 3000. };
int nptbin{15};
TH2D *hcorr=new TH2D(alg.c_str(), hcorrname.c_str(), 23, -2.3, 2.3, nptbin, ptbin );