Changing the y axis range in a TH1F in root

  • Thread starter Thread starter lavster
  • Start date Start date
  • Tags Tags
    Axis Range Root
Click For Summary
To modify a 1D graph in ROOT (TH1F pointer) so that the y-axis represents the number of entries in each bin divided by the total number of entries, users should explore the available methods in the ROOT documentation. Specifically, the "DrawNormalized" method is recommended for achieving this normalization. For further assistance, accessing the online description of the TH1 class at the ROOT website or using search engines to find relevant class information can provide additional guidance.
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
 
Technology 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".
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
3
Views
5K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
6K
  • · Replies 37 ·
2
Replies
37
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
22
Views
5K