PDA

View Full Version : changing the y axis range in a TH1F in root


lavster
Aug11-10, 04:37 AM
hi, im plotting a 1D graph in root (TH1F pointer). currently the y axis gives the number of entries in each bin along my x-axis. how do i change it so that it is actually the number of entries in each bin divided by the total number of entries.

thanks

Timo
Aug11-10, 05:25 AM
I cannot answer your question but from my experience with root: Get to the online description of the classes and look for a suitable member. The description would be here http://root.cern.ch/root/html/TH1.html but I usually just google for "root cern <classname>". In your particular example, I'd try the methods involving something like "normalize", e.g. "DrawNormalized".