# Problem in setting the range of the plot

**URL:** <https://root-forum.cern.ch/t/problem-in-setting-the-range-of-the-plot/50089>\
**Category:** ROOT\
**Created:** [May 24, 2022, 8:41am UTC](https://root-forum.cern.ch/t/problem-in-setting-the-range-of-the-plot/50089 "2022-05-24T08:41:50Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [May 24, 2022, 11:27am UTC](https://root-forum.cern.ch/t/problem-in-setting-the-range-of-the-plot/50089/10 "2022-05-24T11:27:04Z")

</div>

Actually, for “graphs”, it is very easy to use any “arbitrary values” for the x-axis range:  
`graph->GetHistogram()->GetXaxis()->SetLimits(xmin, xmax);`

---

_[View the full topic](https://root-forum.cern.ch/t/problem-in-setting-the-range-of-the-plot/50089)._
