Drawing multiple histograms in one Canvas

Hi, I am trying to draw multiple histograms in one canvas. All of them are normalized.

The code is here…
Double_t scale4 = 1/(hist1_4 ->Integral());
Double_t scale3 = 1/(hist1_3 ->Integral());
Double_t scale2 = 1/(hist1_2 ->Integral());
hist1_2 ->Scale(scale2);
Double_t scale = 1/(hist1 ->Integral());
hist1 ->Scale(scale);
hist1_3 ->GetXaxis()->SetTitle(“GeV”);
But after drawing one of the histogram has large peak so the others are diminished. Is it possible to increase heights of the all other histograms? So that all the histograms will be clearly visible in the canvas.

You should first plot the histogram with larger ranges along X and Y axis (without option “same”). Or you can let ROOT compute the global range using THStack.

Thanks!! I am trying to plot the histogram with larger dynamic along X and Y axis.
i.e hist1_4 (yellow) is plotted first then the others . But this time the histogram with larger peak got cut from the top .

Trying not to use stacked histograms.

Yes that’s the solution of your problem.

Thanks, I will try stacked histograms.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.