# Y-axis range is not changed

**URL:** <https://root-forum.cern.ch/t/y-axis-range-is-not-changed/38719>\
**Category:** Newbie\
**Created:** [April 5, 2020, 2:19pm UTC](https://root-forum.cern.ch/t/y-axis-range-is-not-changed/38719 "2020-04-05T14:19:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertfroast](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/robertfroast/32/21121_2.png) [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Post date:** [April 5, 2020, 2:19pm UTC](https://root-forum.cern.ch/t/y-axis-range-is-not-changed/38719/1 "2020-04-05T14:19:16Z")

</div>

Hi,  
The range of y-axis is not changed.  
I want to set it only upto 3000.  
All the necessary files are updated below:  
[basic.root](https://root-forum.cern.ch/uploads/short-url/s2nfDu0DvEB8UuPOd2sZsR62b4.root) (30.1 KB) [trio.C](https://root-forum.cern.ch/uploads/short-url/hTJDi9ZW9LPtGDtN0JN8F7uboSD.C) (3.2 KB)

Have a nice day.

_ROOT Version:_ Not Provided  
_Platform:_ Not Provided  
_Compiler:_ Not Provided

* * *

---

<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:** [April 5, 2020, 3:23pm UTC](https://root-forum.cern.ch/t/y-axis-range-is-not-changed/38719/2 "2020-04-05T15:23:04Z")

</div>

```cpp
// ...
diff->Add(h2,-1.0);
diff->SetMaximum(3000.);//along Y
// ...

```
