# Making the numbers in the axis bigger

**URL:** <https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939>\
**Category:** Newbie\
**Tags:** python\
**Created:** [May 18, 2021, 1:43am UTC](https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939 "2021-05-18T01:43:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cesar1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/d9b06d/32.png) [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Post date:** [May 18, 2021, 1:43am UTC](https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939/1 "2021-05-18T01:43:26Z")

</div>

Dear experts,

I think it is a very simple thing, but sadly, i am struggling with it. I want to make the numbers in the y and x axis bigger, like (5,10,…) . I have more than 1 histogram plotted in the plot. I tried to use .GetXaxis().SetBinLabel() but it didin’t work, i didn’t do anything on the plot. So there is any other way to do this?.

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [May 18, 2021, 4:33am UTC](https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939/2 "2021-05-18T04:33:47Z")

</div>

You can change the font size of the labels with [`GetXaxis().SetLabelSize()`](https://root.cern/doc/master/classTAttAxis.html#a59684f3441f945f1b2d4e6970ad3d1b5) and the frequency of the ticks and labels with [`GetXaxis().SetNdivisions()`](https://root.cern/doc/master/classTAttAxis.html#ae3067b6d4218970d09418291cbd84084).

---

<div class="post-metadata">

**Author:** ![Cesar1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/d9b06d/32.png) [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Post date:** [May 18, 2021, 12:51pm UTC](https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939/3 "2021-05-18T12:51:12Z")

</div>

So i have one histogram named h\_wplus. And i wrote it in the code:

h\_wplus.GetYaxis().SetLabelSize(0.06)  
h\_wplus.GetXaxis().SetLabelSize(0.08)

But it doesn’t change anything on the plot, the font size did not change after i did that. I have 8 histograms in the plot, do i need to do it for all of them to work?.

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [May 18, 2021, 1:17pm UTC](https://root-forum.cern.ch/t/making-the-numbers-in-the-axis-bigger/44939/4 "2021-05-18T13:17:01Z")

</div>

> [@Cesar1](#):
>
> I have 8 histograms in the plot, do i need to do it for all of them to work?.

No, it’s enough to do it once for your style:

```auto
gStyle->SetLabelSize(0.08, "x");
gStyle->SetLabelSize(0.06, "y");

```
