# Set max digits problem

**URL:** <https://root-forum.cern.ch/t/set-max-digits-problem/21881>\
**Category:** ROOT\
**Created:** [September 15, 2016, 9:05pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881 "2016-09-15T21:05:50Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 15, 2016, 9:05pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/1 "2016-09-15T21:05:50Z")

</div>

Hi, i’ve a problem using the set max digits in the macro in the attachment…when i run it, as you can see the “x10^3” of y axis is so far by the axis…why?

![](http://i68.tinypic.com/dz9zix.png)  
[profilospaziale.c](https://root-forum.cern.ch/uploads/default/original/2X/2/24b17b2931b4c3b7ee85c6bc066f4b26c73e682d.c) (2.31 KB)

---

<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:** [September 16, 2016, 7:31am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/2 "2016-09-16T07:31:22Z")

</div>

Looking at it …

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 16, 2016, 7:38am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/3 "2016-09-16T07:38:23Z")

</div>

> [@couet](#):
>
> Looking at it …

Thanks cuet…I don’t know the reason…on x axis and z axis I don’t have problems…just on y-axis. I hope you can find the solution! I’m writing the thesis…!

---

<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:** [September 16, 2016, 8:04am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/4 "2016-09-16T08:04:52Z")

</div>

This is bizarre… I have no answer and no work around right now…

---

<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:** [September 16, 2016, 8:13am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/5 "2016-09-16T08:13:18Z")

</div>

Just as a reminder here is the minimal macro reproducing the problem :

```auto
void profilospaziale()
{
   TFile *f = TFile::Open("cors_plot-prottot.root");
   TH3F *hgamrxryrz = (TH3F *)f->Get("hgamrxryrz");
   TGaxis::SetMaxDigits(3);
   hgamrxryrz->Draw();
   gPad->SetBottomMargin(0.3);
}

```

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 16, 2016, 8:17am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/6 "2016-09-16T08:17:01Z")

</div>

Hi couet…and other bizarre thing is that on th2f I don’t have problems …i’ve this problem just on th3f…

---

<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:** [September 16, 2016, 8:18am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/7 "2016-09-16T08:18:45Z")

</div>

Yes … as I told I have no answer. That’s a bug iI need to track …

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 16, 2016, 8:23am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/8 "2016-09-16T08:23:53Z")

</div>

thanks…well…if it will be not possible to resolve…i think i will use photoshop to move the “x10^3”

---

<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:** [September 16, 2016, 11:58am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/9 "2016-09-16T11:58:48Z")

</div>

> [@](#):
>
> and other bizarre thing is that on th2f I don’t have problems …i’ve this problem just on th3f…

No, it is the same with th2…

```auto

root [1] TH2D *h = new TH2D("h","h",10,0,10000,10,0,10000);
root [2] h->Draw("lego") ;
root [3] TGaxis::SetMaxDigits(3);
root [4] gPad->SetBottomMargin(0.3);

```

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 18, 2016, 10:26pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/10 "2016-09-18T22:26:27Z")

</div>

but for example in this plot I don’t have this problem

![](http://i68.tinypic.com/2ymsjs2.png)

---

<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:** [September 19, 2016, 8:18am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/11 "2016-09-19T08:18:33Z")

</div>

yes Only the 3D plots are affected… Like LEGO option for 2D histos

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 19, 2016, 10:23am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/12 "2016-09-19T10:23:14Z")

</div>

Ah ok! Well I hope you will fix it in next version!

---

<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:** [September 19, 2016, 1:13pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/13 "2016-09-19T13:13:03Z")

</div>

Fixed 6.08. Should I put it also in 5.34 ?

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 19, 2016, 4:02pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/14 "2016-09-19T16:02:14Z")

</div>

I use Windows OS…and there isn’t ROOT for windows…so if you can fix ROOT 5.34 for Windows…of course it will be welcome!

---

<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:** [September 19, 2016, 4:08pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/15 "2016-09-19T16:08:51Z")

</div>

done

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 19, 2016, 4:11pm UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/16 "2016-09-19T16:11:56Z")

</div>

must I download the debug package [root.cern.ch/download/root\_v5.3 … .debug.exe](https://root.cern.ch/download/root_v5.34.36.win32.vc10.debug.exe) ?

---

<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:** [September 20, 2016, 7:17am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/17 "2016-09-20T07:17:22Z")

</div>

I think you need to install it form the source … head of 5.34 patches

---

<div class="post-metadata">

**Author:** ![faca87](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://root-forum.cern.ch/u/faca87)\
**Post date:** [September 21, 2016, 10:32am UTC](https://root-forum.cern.ch/t/set-max-digits-problem/21881/18 "2016-09-21T10:32:50Z")

</div>

Thanks…I will see (now I’m a bit busy)
