# Change the range of the (log) Y axis for a stacked histogram

**URL:** <https://root-forum.cern.ch/t/change-the-range-of-the-log-y-axis-for-a-stacked-histogram/14148>\
**Category:** ROOT\
**Created:** [April 16, 2012, 1:42pm UTC](https://root-forum.cern.ch/t/change-the-range-of-the-log-y-axis-for-a-stacked-histogram/14148 "2012-04-16T13:42:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbungau](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@cbungau](https://root-forum.cern.ch/u/cbungau)\
**Post date:** [April 16, 2012, 1:42pm UTC](https://root-forum.cern.ch/t/change-the-range-of-the-log-y-axis-for-a-stacked-histogram/14148/1 "2012-04-16T13:42:01Z")

</div>

Dear all,

I would be very grateful if you could please let me know how to modify the range of the Y axis for a stacked histogram when the Y axis is drawn on a log scale. I have attached a simple script. I cannot modify the range of the Y axis on the log scale plot in any way. SetRangeUser(double, double) does not seem to work…

Thank you,

Cristian  
[hstack.C](https://root-forum.cern.ch/uploads/default/original/2X/b/b23ea22da836ad5771a7f0c7ac1ca54710eb6621.C) (1.12 KB)

---

<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:** [April 16, 2012, 1:48pm UTC](https://root-forum.cern.ch/t/change-the-range-of-the-log-y-axis-for-a-stacked-histogram/14148/2 "2012-04-16T13:48:29Z")

</div>

See: [url][SetAxisRange(0.0,1.0,"Y"); is ineffective](https://root-forum.cern.ch/t/setaxisrange-0-0-1-0-y-is-ineffective/14040/1)

---

<div class="post-metadata">

**Author:** ![cbungau](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@cbungau](https://root-forum.cern.ch/u/cbungau)\
**Post date:** [April 16, 2012, 3:00pm UTC](https://root-forum.cern.ch/t/change-the-range-of-the-log-y-axis-for-a-stacked-histogram/14148/3 "2012-04-16T15:00:31Z")

</div>

Thank you very much for your help. It is working fine now.

Best regards,

Cristian
