# Entries in histogram don't match with contents

**URL:** <https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321>\
**Category:** ROOT\
**Created:** [March 26, 2019, 1:05pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321 "2019-03-26T13:05:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![casado](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/casado/32/29034_2.png) [@casado](https://root-forum.cern.ch/u/casado)\
**Post date:** [March 26, 2019, 1:05pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/1 "2019-03-26T13:05:59Z")

</div>

Dear root experts,

I’m dealing with a histogram which I fill with weight 1. but if I look at the number of entries it doesn’t match with the contents I see in the histogram. How is this possible? I attach an image of the histogram.

Many thanks in advance, Pilar Casado ![45](https://root-forum.cern.ch/uploads/default/original/3X/5/f/5fb4f3f904ca4a08abafe8adc09d588775624345.png)

* * *

\_ROOT Version: 6.04/16  
\_Platform:centOS7  
\_Compiler:linuxx8664gcc

* * *

---

<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 26, 2019, 1:09pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/2 "2019-03-26T13:09:17Z")

</div>

Can you post the histogram here ?

---

<div class="post-metadata">

**Author:** ![Triple\_S](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/triple_s/32/17129_2.png) [@Triple\_S](https://root-forum.cern.ch/u/Triple_S)\
**Post date:** [March 26, 2019, 1:12pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/3 "2019-03-26T13:12:11Z")

</div>

Does your histogram have entries in the under- / overflow bins?  
I’m quite sure these are also counted to the entries and they are not being displayed.

---

<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 26, 2019, 1:26pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/4 "2019-03-26T13:26:47Z")

</div>

> [@Triple\_S](#):
>
> Does your histogram have entries in the under- / overflow bins?

No … see the stats …

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 26, 2019, 1:35pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/5 "2019-03-26T13:35:44Z")

</div>

[If it is a TH1F, use TH1D instead.](https://root-forum.cern.ch/t/th1f-overflow-in-bin-content/33252)

---

<div class="post-metadata">

**Author:** ![casado](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/casado/32/29034_2.png) [@casado](https://root-forum.cern.ch/u/casado)\
**Post date:** [March 26, 2019, 2:01pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/7 "2019-03-26T14:01:34Z")

</div>

It works with TH1D. Many thanks, Pilar

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 9, 2019, 2:01pm UTC](https://root-forum.cern.ch/t/entries-in-histogram-dont-match-with-contents/33321/8 "2019-04-09T14:01:38Z")

</div>

Closed on April 9, 2019, 2:01pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
