Hi Rooters, I need one help. I want to give customized binning to histogram using this function
TH1F * definevar1dHistogram(TString hname, int xbinnum_5, Float_t xbins_5[], TString xtitle, int color = kGreen+3){
TH1F *h1 = new TH1F(hname, hname, xbinnum_5, xbins_5 );
h1->GetXaxis()->SetTitle(xtitle);
h1->GetXaxis()->SetTitleOffset(1.20);
h1->SetLineColor(color);
h1->SetLineWidth(2.);
return h1;
}
like the binning I am using float xbin[9] = {-1.8,-1.6,-1.4,-1.0,0,1.0,1.4,1.6,1.8} ;
how can I do this ? Because this histogram stops at -1.0 bin and rest of the bins don’t appear on the histogram.
ROOT Version: no idea
Platform: lxplus6
Compiler: no idea