Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Changing the y axis range in a TH1F in root

  1. Aug 11, 2010 #1
    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.

  2. jcsd
  3. Aug 11, 2010 #2
    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".
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook