# How to change the position of axes of a graph

**URL:** <https://root-forum.cern.ch/t/how-to-change-the-position-of-axes-of-a-graph/51970>\
**Category:** Newbie\
**Tags:** root\
**Created:** [October 14, 2022, 9:04pm UTC](https://root-forum.cern.ch/t/how-to-change-the-position-of-axes-of-a-graph/51970 "2022-10-14T21:04:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 15, 2022, 4:49am UTC](https://root-forum.cern.ch/t/how-to-change-the-position-of-axes-of-a-graph/51970/2 "2022-10-15T04:49:31Z")

</div>

> [@Problem in setting the range of the plot](https://root-forum.cern.ch/t/problem-in-setting-the-range-of-the-plot/50089):
>
> Dear Root experts, I have a problem on setting the range of a TGraphErrors plot. The comands that I wrote in the macro are the following: g-\>GetXaxis()-\>SetTitle("E (MeV)"); g-\>GetXaxis()-\>SetRangeUser(1e-9,10.); g-\>GetYaxis()-\>SetTitle("Estimated/Ref"); g-\>GetYaxis()-\>SetRangeUser(0.,4.5); gPad-\>Modified(); gPad-\>Update(); For the y-axis no problem. However, for the x-axis it do not change whatever values I put in the comand GetXaxis. I am writing something wrong in the co…

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-change-the-position-of-axes-of-a-graph/51970)._
