# StatFormat does not modify the integral value

**URL:** <https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291>\
**Category:** ROOT\
**Created:** [May 26, 2015, 6:59am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291 "2015-05-26T06:59:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [May 26, 2015, 6:59am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/1 "2015-05-26T06:59:19Z")

</div>

Hello, on the plot I attached, I am not able to see the exact number of the integral. Basically, I tried to modify the Stat Format of the TPaveStats object writing “8.8g” instead of “6.4g”. In principle, all the digits of the integral should be displayed but it is not modified while it is for other quantities (meanX, meanY, …). Am I doing something wrong?

 ![](https://root-forum.cern.ch/uploads/default/original/2X/e/e7e8097f4bff4e80669b3d44757ff40162cca376.gif)  
  
[2D\_pavestat.C](https://root-forum.cern.ch/uploads/default/original/2X/b/b1ec1d124b3263b8a7ccf17b9784434efc983ace.C) (447 KB)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 26, 2015, 7:24am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/2 "2015-05-26T07:24:12Z")

</div>

I do no see any SetStatFormat in your macro.

---

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [May 26, 2015, 7:31am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/3 "2015-05-26T07:31:11Z")

</div>

It is not saved; I do not know why. Yet, if you run it and change StatFormat manually (ptstats-\>SetStatFormat(“8.8g”) for example), you will get the picture shown on the first post; all numbers are modified except the integral.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 26, 2015, 7:42am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/4 "2015-05-26T07:42:19Z")

</div>

I see… in case of 2D histo the format is not taken into account for Integral.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 26, 2015, 7:50am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/5 "2015-05-26T07:50:14Z")

</div>

If I modify THistPainter to take the format into account I get the attached picture.

 ![](https://root-forum.cern.ch/uploads/default/original/2X/5/5f7f1ba692ef3475c398e133b54716146a5738f8.png)

---

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [May 26, 2015, 7:58am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/6 "2015-05-26T07:58:16Z")

</div>

This is the value that is given by “HPGe\_PIPS-\>Integral()”. It looks good.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 26, 2015, 8:06am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/7 "2015-05-26T08:06:48Z")

</div>

This fix is now pushed in 6.04

---

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [May 26, 2015, 8:08am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/8 "2015-05-26T08:08:34Z")

</div>

Thanks, could you also apply the fix on the 5.34 branch?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 26, 2015, 8:25am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/9 "2015-05-26T08:25:46Z")

</div>

Done

---

<div class="post-metadata">

**Author:** ![pamputt](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pamputt/32/12526_2.png) [@pamputt](https://root-forum.cern.ch/u/pamputt)\
**Post date:** [May 26, 2015, 8:32am UTC](https://root-forum.cern.ch/t/statformat-does-not-modify-the-integral-value/19291/10 "2015-05-26T08:32:40Z")

</div>

Thank you 😃
