Axis for HIstogram

Hello,
I am superposing a bunch of 1-D histograms on a canvass, however, the range of the y-axis is not large enough so that most of the histograms go beyond the current y-axis scope. For example, some y values of the histograms are roughly 100000, but the current maximum y-axis value is only 5. Is there any way I can try to increase the scope of y-axis? PS: when I plot these histograms individually, the scope of y-axis works well.
Thanks!
Best,
Jason

THStack

1 Like

Assume “hist” is the pointer to your histogram with ymax=5
Then do:
“hist->SetMaximum(1000000)”

Otto

HI,
That helps, thanks a lot!
I have one more question associated with my current stack of histograms. There have been only two TPaveStats:: stats objects (indicating the mean and RMS of a histogram) of two different histograms shown on the right top corner of my canvass. But I actually draw five histograms together on the same canvass, so is there any way that i can impose the other three TPaveStats:: stats objects on the canvass as well?
Best,
Jason

Never mind, I figure out how to solve the issue! Thanks anyway.
Best,

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