root [14] THStack *hs = new THStack(“hs”,"");
root [15] hs->Add(hm2rec2OS_ttbb3);
root [16] hs->Add(hm2rec2OS_ttbb4);
root [17] hs->Add(hm2rec2OS_ttbb5);
root [18] hs->Draw();
Error in TH1F::Add: Attempt to add histograms with different number of bins
Error in TH1F::Add: Attempt to add histograms with different number of bins
ROOT6:
root [6] THStack *hs = new THStack(“hs”,"");
root [7] hs->Add(hm2rec2OS_ttbb3);
root [8] hs->Add(hm2rec2OS_ttbb4);
root [9] hs->Add(hm2rec2OS_ttbb5);
root [10] hs->Draw();
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
Info in TH1F::Add: Attempt to add histograms with different number of bins - trying to use TH1::Merge
Error in : Cannot merge histograms - limits are inconsistent:
first: hm2rec2OS_ttbb4 (60, 2.500000, 4.000000), second: hm2rec2OS_ttbb3 (125, 0.000000, 2.500000)
Info in TH1F::Add: Attempt to add histograms with different number of bins - trying to use TH1::Merge
Error in TH1Merger::DifferentAxesMerge: Cannot merge histograms - the histograms hm2rec2OS_ttbb5 can extend the X axis or have different limits and underflows/overflows are present in the histogram hm2rec2OS_ttbb5.
What I want is to plot first one from 0 to 2.5 , the second one from 2.5 to 4.0, third one from 4.0 to 8.0 resulting in just one histogram.