Basic problem about histogram statistics box

I was using the TH1D histograms and noticed that Mean and RMS in the statistic box are all on x-axis. Is it possible to change them into “y-axis” (the value for each bins)?

Also I found wf->GetMean(2) and wf->GetRMS(2) are 0 all the time.



No, GetMnean and GetRMS compute the mean and RMS weighted by the bin centre position.
I guess what you want is the mean and RMS values of the bin contents.
You could use: TMath::Mean( nbins, hist->GetArray() ) and TMath::RMS( nbins, hist->GetArray() )


I see, so the bin content does not automatically becomes the y-axis content in a 2-D graph. And so there are probably no change the statistics box with such option.