# Updating stats after changing the axis range in GUI

**URL:** <https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121>\
**Category:** Newbie\
**Created:** [February 10, 2024, 7:18am UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121 "2024-02-10T07:18:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh-2000](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/e47774/32.png) [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Post date:** [February 10, 2024, 7:18am UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/1 "2024-02-10T07:18:17Z")

</div>

Hello users,  
most probaby a naive question,  
When we change the axis range with a mouse in GUI does the histograms statistics(mean, mean error, so… etc) are already reset or ResetStats() needs be invoked to update the histo statistics.

Thanks for your patience  
.

---

<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:** [February 11, 2024, 9:04am UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/2 "2024-02-11T09:04:41Z")

</div>

That’s just a graphical zoom. The histogram is not changed. @moneta can confim

---

<div class="post-metadata">

**Author:** ![yvonne910rhodes](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/e95f7d/32.png) [@yvonne910rhodes](https://root-forum.cern.ch/u/yvonne910rhodes)\
**Post date:** [March 14, 2024, 12:01pm UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/3 "2024-03-14T12:01:51Z")

</div>

> [@utkarsh-2000](#):
>
> Hello users,  
> most probaby a naive question,  
> When we change the axis range with a mouse in GUI does the histograms statistics(mean, mean error, so… etc) are already reset or ResetStats() needs be invoked to update the histo statistics.
> 
> Thanks for your patience

I have a same question. Please help me to clear my doubt.

---

<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:** [March 14, 2024, 2:24pm UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/4 "2024-03-14T14:24:49Z")

</div>

Welcome to the ROOT forum.

That’s just a graphical zoom. The histogram is not changed. If you have the stats ON you will see that Mean and Std dev change to adapt to the new view but if you unzoom they come back to the initial values

---

<div class="post-metadata">

**Author:** ![utkarsh-2000](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/e47774/32.png) [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Post date:** [March 14, 2024, 3:03pm UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/5 "2024-03-14T15:03:17Z")

</div>

> [@couet](#):
>
> If you have the stats ON you will see that Mean and Std dev change

Hi @couet ,

Yes, I was also referrng to this behavior of the status bar changing with the graphical zoom.

However, the number of entries remains unchanged to reflect the unzoomed range, right ?

Thanks a lot !

---

<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:** [March 14, 2024, 3:34pm UTC](https://root-forum.cern.ch/t/updating-stats-after-changing-the-axis-range-in-gui/58121/6 "2024-03-14T15:34:38Z")

</div>

The number of entries is always the total number of entries. It is not possible to compute the number of entries on a specific range as the weight at filling time can be different.
