# Exponent in the plot axis

**URL:** <https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079>\
**Category:** Newbie\
**Tags:** root\
**Created:** [March 17, 2023, 7:48am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079 "2023-03-17T07:48:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NgJunKai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ngjunkai/32/30046_2.png) [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Post date:** [March 17, 2023, 7:48am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079/1 "2023-03-17T07:48:51Z")

</div>

I am using scientific notation by `TAXis::SetMaxDigits(N)`  
but when i do multiple plots without border or gap, says `Divide(1,3,0,0)`, this exponent will get blocked.  
Any method to access this guy and probably I can use SetNDC to move this guy around ?

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/f/9/f94a8bbfa826709ffc621bdf80a334031958aab5.png)

note: I am using version 6.26

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 17, 2023, 8:04am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079/2 "2023-03-17T08:04:37Z")

</div>

```auto
...
   TGaxis::SetMaxDigits(2);
   TGaxis::SetExponentOffset(-0.01, 0.01, "y"); // X and Y offset for Y axis
   TGaxis::SetExponentOffset(-0.05, 0.01, "x"); // Y and Y offset for X axis
...
   hist->Draw();

```

---

<div class="post-metadata">

**Author:** ![NgJunKai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ngjunkai/32/30046_2.png) [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Post date:** [March 17, 2023, 8:23am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079/3 "2023-03-17T08:23:48Z")

</div>

but it’s a `TAxis` object when I do `TGraphErrors::GetYaxis()`…  
how to access the `TGaxis` objects from such graphs or histograms ?

---

<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:** [March 17, 2023, 8:34am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079/4 "2023-03-17T08:34:43Z")

</div>

These are “static member functions”, so try to call them as shown. In python: `ROOT.TGaxis.Set...(...)`

---

<div class="post-metadata">

**Author:** ![NgJunKai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ngjunkai/32/30046_2.png) [@NgJunKai](https://root-forum.cern.ch/u/NgJunKai)\
**Post date:** [March 17, 2023, 8:37am UTC](https://root-forum.cern.ch/t/exponent-in-the-plot-axis/54079/5 "2023-03-17T08:37:51Z")

</div>

ok, got it.  
so it’s something ‘global’ in python, so it should be a line like `ROOT.TGaxis()`
