# Can i increase the number of bins?

**URL:** <https://root-forum.cern.ch/t/can-i-increase-the-number-of-bins/44857>\
**Category:** Newbie\
**Tags:** python\
**Created:** [May 13, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/can-i-increase-the-number-of-bins/44857 "2021-05-13T16:12:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cesar1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/d9b06d/32.png) [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Post date:** [May 13, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/can-i-increase-the-number-of-bins/44857/1 "2021-05-13T16:12:28Z")

</div>

Dear experts,

I am trying to understand if i can increase the numbers of bins in a read histogram from a file. I know the .Rebin() can decrease the number of bins, but can it increase it?

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [May 13, 2021, 4:15pm UTC](https://root-forum.cern.ch/t/can-i-increase-the-number-of-bins/44857/2 "2021-05-13T16:15:32Z")

</div>

No, if you have already read the histogram from a file, you can’t increase the number of its bins. There is no way to figure out which numbers should go into these new bins, as a histogram does not store the numbers somebody filled your histogram with. It stores only bin contents. No bin, no content.

---

<div class="post-metadata">

**Author:** ![Cesar1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/d9b06d/32.png) [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Post date:** [May 13, 2021, 4:31pm UTC](https://root-forum.cern.ch/t/can-i-increase-the-number-of-bins/44857/3 "2021-05-13T16:31:51Z")

</div>

> [@yus](#):
>
> th. It stores only bin contents. N

Okay, good to know. Thank you @yus !
