# How to change the scaling of a TGraph?

**URL:** <https://root-forum.cern.ch/t/how-to-change-the-scaling-of-a-tgraph/54766>\
**Category:** Newbie\
**Created:** [May 7, 2023, 9:29am UTC](https://root-forum.cern.ch/t/how-to-change-the-scaling-of-a-tgraph/54766 "2023-05-07T09:29:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grattoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/8491ac/32.png) [@grattoni](https://root-forum.cern.ch/u/grattoni)\
**Post date:** [May 7, 2023, 9:29am UTC](https://root-forum.cern.ch/t/how-to-change-the-scaling-of-a-tgraph/54766/1 "2023-05-07T09:29:32Z")

</div>

Is there a way to change the scaling of a particular axis without modifying the dataset? I am working with values with magnitude of 10^18 in x axis and 10^-15 on the y axis. ROOT keeps scaling the x axis for x10^15, which is not what I want, I want it to scale for 10^18 . How can I achieve this?

---

<div class="post-metadata">

**Author:** ![grattoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/8491ac/32.png) [@grattoni](https://root-forum.cern.ch/u/grattoni)\
**Post date:** [May 7, 2023, 11:06am UTC](https://root-forum.cern.ch/t/how-to-change-the-scaling-of-a-tgraph/54766/2 "2023-05-07T11:06:00Z")

</div>

It can only be rescaled for the appropiate magnitude if the limits were set for more than x10^2 for the boundary wanted. Setting the boundaries

`data->GetXaxis()->SetLimits(0, 0.12e20);`

like this gave me what I want, showing the x axis in the scope of x10^18 for some reason…
