Redefining axes limits after using draw("same")

Hi,

I am doing several plots of TH1 objects on the same TCanvas using ->Draw(“same”) but if one of the plots as data beyond the limits of the first plot, it doesn’t appear on the TCanvas because the limits are not automatically redefined. Is there a command to do that? A could try looking for maximum and minimum values in all plots, but I have the feeling that something so elementary already exists :wink:

THStack does that (option nostack). It compute the global range of all the histograms therefore they are all inside the limits.

root.cern.ch/root/html/THStack.html

root.cern.ch/root/html/THistPainter.html#HP26