Multi graphs by TH2F and different bin number, bin size

Hi,

I want to plot the multi graph by TH2F command. The data is histogram data points and the fitting lines in the same graph. The points are different bin numbers and different bin sizes. How should I do for that?

I see the TH2F commands,

TH2F(const char* name, const char* title, Int_t nbinsx, const Double_t* xbins, Int_t nbinsy, const Double_t* ybins)
TH2F(const char* name, const char* title, Int_t nbinsx, const Float_t* xbins, Int_t nbinsy, const Float_t* ybins)
TH2F(const char* name, const char* title, Int_t nbinsx, const Double_t* xbins, Int_t nbinsy, Double_t ylow, Double_t yup)
TH2F(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, const Double_t* ybins)
TH2F(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup)

My code is


TH2F * multi = new TH2F(“multi”, “multi”, 20, 0.0, 2.0, 6, 0, 6);

I have to input the bin numbers and bin sizes, but my data of multi graphs have each data has different bin numbers and different bin size, and different number of the data. Do I have to use different command such as TGraph instead of TH2F?

Thank you!

Look at: root.cern.ch/root/html/TGraph2D.html
may be that’s what you need.

Thank you for your reply. I will check TGraph2D.