Attached’s a patch to display TH1::Integral(“width”) instead of TH1::Integral() in TPaveStats (git diff against trunk rev f9e6c8dcedff7cfd4ab3531b4a960128ea1e41c2).
It introduces the option “I”=2 (the default one remains “i”=1):
{
TH1D * histo1D = new TH1D ("histo1D","",2,0.,4.) ;
histo1D->SetBinContent( 1,1.) ;
histo1D->SetBinContent( 2,2.) ;
TCanvas * canvas = new TCanvas () ;
canvas->Divide(2,1) ;
canvas->cd(1) ; gStyle->SetOptStat("nemruoi") ; histo1D->DrawClone() ;
canvas->cd(2) ; gStyle->SetOptStat("nemruoI") ; histo1D->DrawClone() ;
}
Could this (or any better version) please be committed to the trunk?
One more thing. When you use “I” instead of “i” there no changes on the Stats display showing that you have used one or the other. I am not sure that’s a good thing.
[quote]When you use “I” instead of “i” there no changes on the Stats display showing that you have used one or the other.[/quote]So let’s introduce it. Among first ideas comingIntegral*
Integral*x
Integral_BW
Integral(BW)
Integral_W
Integral(W)
Integral_w
Integral(w)
Integral("width")
Integral\times#DeltaXI propose “Integral(w)” as a default.
As usual the best is to let the end user choose.
Hence a new entry in $ROOTSYS/etc/system.rootrc (.rootrc): Hist.Stats.IntegralBinWidth: Integral(w)
[quote]Only is missing the doc. Can you provide it in your diff ?[/quote]See the diff files below (same trunk rev as above, TStyle.cxx.2.diff = TStyle.cxx.diff provided not to forget it). Feature above documented.
Hi Olivier,
Some comments were missing.
Git diff against master branch 06ba34699dfd5a8f7c898f9371984837a52f334d.
See ya,
Z TStyle.cxx.3.diff (892 Bytes)