# h2-\>Fill problem

**URL:** <https://root-forum.cern.ch/t/h2-fill-problem/13124>\
**Category:** ROOT\
**Created:** [September 22, 2011, 9:51pm UTC](https://root-forum.cern.ch/t/h2-fill-problem/13124 "2011-09-22T21:51:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [September 23, 2011, 9:24am UTC](https://root-forum.cern.ch/t/h2-fill-problem/13124/4 "2011-09-23T09:24:04Z")

</div>

A possible brutal fix …  
Fill your histogram using bins that produce nice results.  
Afterwards, change the ranges of the axes of your histogram, like in the “Can we shift histogram for several channels?” thread: [url][Can we shift histogram for several channels?](https://root-forum.cern.ch/t/can-we-shift-histogram-for-several-channels/12050/1)  
You don’t even need to change the source code presented there (as TH3 and TH2 inherit from TH1, it should work fine - all the methods for “X”, “Y” and “Z” axes are there).

---

_[View the full topic](https://root-forum.cern.ch/t/h2-fill-problem/13124)._
