TProfile - plot the sum of bincontent

Hello rooters!

Is there an elegant way to plot the sum of the bin content? I read that TProfile always plots the bincontent vs. the number of entries in bin.
Easily I can multiply the bincontent with the number of bin-entries when I call the fill-method, but I wanna know if there is a better way…

Thanks

Hi,

some context is needed: what do you exactly mean by “Is there an elegant way to plot the sum of the bin content”? What is your usecase?

Danilo

I don’t want to plot the average of my data in every bin, but the sum (without dividing by the number of the bin).
The root manual says:“
H(J) = sum Y
h(J) = H(J)/L(J)
The displayed bin content for bin J of a TProfile is always h(J).”

My question is: Can I set the option to H(J)?

Hi,

apologies for the delay: your mail got for some reason buried :frowning:
You can look into the ProjectionX and ProjectionY methods of TH2.

Cheers,
Danilo