Overlay two histograms drawn by two . root files on one canvas


I have two . root files and draw histograms according to the data in them. I want to put these two histograms on the same canvas for comparison. What should I do?

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.23/01
Platform: Centos7
Compiler: GCC 8.3.1


Draw the first one and then draw the second with the “same” option, e.g. h2->Draw(“same”), or (a safer bet) put them in a THStack and draw the stack with the “Nostack” option.

1 Like