# TH1::Integral("width") in TPaveStats (statbox)

**URL:** <https://root-forum.cern.ch/t/th1-integral-width-in-tpavestats-statbox/16238>\
**Category:** ROOT\
**Created:** [June 13, 2013, 8:21pm UTC](https://root-forum.cern.ch/t/th1-integral-width-in-tpavestats-statbox/16238 "2013-06-13T20:21:23Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Zesp](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/b5ac83/32.png) [@Zesp](https://root-forum.cern.ch/u/Zesp)\
**Post date:** [June 13, 2013, 8:21pm UTC](https://root-forum.cern.ch/t/th1-integral-width-in-tpavestats-statbox/16238/1 "2013-06-13T20:21:23Z")

</div>

Hi there,

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?

Cheers,  
Z  
[TStyle.cxx.diff](https://root-forum.cern.ch/uploads/default/original/2X/b/babfb0511444d5fd50080f195d9ebb5e15996295.diff) (514 Bytes)  
[THistPainter.cxx.diff](https://root-forum.cern.ch/uploads/default/original/2X/f/f5247f4d35254d40ff7fac03fb87c51eb8854f24.diff) (901 Bytes)

---

_[View the full topic](https://root-forum.cern.ch/t/th1-integral-width-in-tpavestats-statbox/16238)._
