# Why Are The Axis Numbers Cutting off?

**URL:** <https://root-forum.cern.ch/t/why-are-the-axis-numbers-cutting-off/40628>\
**Category:** Newbie\
**Tags:** hist\
**Created:** [July 24, 2020, 10:10pm UTC](https://root-forum.cern.ch/t/why-are-the-axis-numbers-cutting-off/40628 "2020-07-24T22:10:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [July 24, 2020, 10:10pm UTC](https://root-forum.cern.ch/t/why-are-the-axis-numbers-cutting-off/40628/1 "2020-07-24T22:10:17Z")

</div>

Dear experts,

I am trying to figure out why the numbers on my histogram axes are cutting off. I tried to use `TGaxis::SetMaxDigits(2);` to prevent that from happening, but that did not really help. The 10 on the top is still cut off. Can you please provide me with some methods that I can try to get rid of this problem? Thank you very much for your help!

This is the canvas I am using: `TCanvas* myC=new TCanvas("myC", "", 10, 10, 1900, 800);`

I also divide the canvas intro three different pads.

Here is a copy of the results from one of the pads:

 ![Screen Shot 2020-07-24 at 5.09.01 PM](https://root-forum.cern.ch/uploads/default/original/3X/8/1/8169f1e9593fd9b74b9160073314424124606de3.png)

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [July 25, 2020, 8:49am UTC](https://root-forum.cern.ch/t/why-are-the-axis-numbers-cutting-off/40628/2 "2020-07-25T08:49:19Z")

</div>

You need to increase the margins inside each pad.  
Check for example the code in [this](https://root.cern/primer/#add-and-divide-histograms) part of the ROOT Primer (in particular, the lines similar to `c_divide->GetPad(1)->SetRightMargin(.01);` at the bottom of the example); you can do the same for Bottom/Top/Left margins (i.e. SetBottomMargin and so on…).  
More details here [https://root.cern/doc/v622/classTAttPad.html](https://root.cern/doc/v622/classTAttPad.html)

---

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [July 25, 2020, 4:23pm UTC](https://root-forum.cern.ch/t/why-are-the-axis-numbers-cutting-off/40628/3 "2020-07-25T16:23:03Z")

</div>

> [@dastudillo](#):
>
> [ROOT: TAttPad Class Reference](https://root.cern/doc/v622/classTAttPad.html)

Thank you very much! This is exactly what I need!
