How to zoom a portion of a histogram and insert over the same histogram

Hi everyone!

I am new to this forum.

I want to zoom a portion of a histogram and to put it on the same histogram in order to see the low energy peaks. I don’t have any idea how to proceed. I am attaching the picture in which this job is done and i want to plot exactly the same way.

Thank you

   auto h = new TH1D("h","h",100,-4,4);
   TPad *p = new TPad("p","p", 0.5,0.6,0.9,0.8);
   TH1D *hc = (TH1D *)h->DrawCopy();
1 Like

Thank you so much for your instant reply, I got the idea. It worked well.

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