# How to reset the range and size of Bin?

**URL:** <https://root-forum.cern.ch/t/how-to-reset-the-range-and-size-of-bin/58597>\
**Category:** ROOT\
**Created:** [March 20, 2024, 9:23am UTC](https://root-forum.cern.ch/t/how-to-reset-the-range-and-size-of-bin/58597 "2024-03-20T09:23:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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 21, 2024, 7:36am UTC](https://root-forum.cern.ch/t/how-to-reset-the-range-and-size-of-bin/58597/5 "2024-03-21T07:36:23Z")

</div>

As @alex_HXY said you should create `h2`with the same number of bin as `h1`.

Also I see that you create `h3` with the name `"n_energy_p/n"`. That’s not a good idea to have “/” in histograms’ names. See:

> [@How to draw an object with special characters in its name?](https://root-forum.cern.ch/t/how-to-draw-an-object-with-special-characters-in-its-name/28248):
>
> In general it is not a good idea to have object’s name containing special character like “”, “/”, “#” etc … or even have object name starting with a number because they might be not accessible from the ROOT command line. For instance “/” is the separator for directory level in a file therefore an object having a “/” in its name cannot be access from the command line. Nevertheless it may happen that the some object can be named that way and stored in a ROOT file. The following macro show how to…

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-reset-the-range-and-size-of-bin/58597)._
