Integral on 2-D histogram

Hello,
I have been working on a project in which I create a 2D histogram: x and y-axes are on display, and the histogram is filled with colored blocks indicating the height on the z-axis.(I have used the COLZ draw option and the values of z are all greater than 0.) Now for each x axis value, I want to find the integral of the area above y axis and below the corresponding z values, and hence plot a new 1D histogram with the original x axis and the intrgral value as the y axis. Any idea how i can achieve that?
Thanks a lot!
Best,
Jason

How about: TH2::ProjectionX

Hello,
thanks for replying to my question. Can you be more specific about what you are suggesting? Are you saying that i should use the projection method in the draw option of a 2D histogram? It would be best if you could show me where i can find some examples!
Best,
Jason

grep -r ProjectionX ${ROOTSYS}/tutorials

HI,
Thanks for your response. I have checked with the materials and don’t think that either ProjectionX or ProjectionY is the method I need. All I want to do is to find the integral along the Y-Axis for a given value of x and then plot the integral value against x-axis value on a new graph. Do you have any other suggestions?
Thanks a lot!
Best,
Jason

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