Changing the y axis range in a TH1F in root

  • Thread starter Thread starter lavster
  • Start date Start date
  • Tags Tags
    Axis Range Root
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 8K views
lavster
Messages
213
Reaction score
0
hi, I am 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
 
Physics news on Phys.org
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".