# How to set Y axis of a histogram

**URL:** <https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198>\
**Category:** Newbie\
**Created:** [August 28, 2020, 5:19pm UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198 "2020-08-28T17:19:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afzaal786](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/afzaal786/32/20527_2.png) [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Post date:** [August 28, 2020, 5:19pm UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198/1 "2020-08-28T17:19:39Z")

</div>

How one can set the Y axis scale of a histogram?

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [August 29, 2020, 10:22am UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198/2 "2020-08-29T10:22:32Z")

</div>

[https://root.cern/doc/master/classTH1.html](https://root.cern/doc/master/classTH1.html)  
scroll down a bit to Drawing Histograms.

---

<div class="post-metadata">

**Author:** ![Afzaal786](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/afzaal786/32/20527_2.png) [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Post date:** [August 31, 2020, 12:58am UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198/3 "2020-08-31T00:58:52Z")

</div>

With reference to it when i set Double\_t maximum = 1 and Double\_t minimum = -10 for y axis of an histogram then no effect occurred after it.

---

<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:** [September 2, 2020, 1:31pm UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198/4 "2020-09-02T13:31:59Z")

</div>

```auto
histogram->SetMaximum(...);
histogram->SetMinimum(...);

```
