Making the numbers in the axis bigger

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?.

You can change the font size of the labels with GetXaxis().SetLabelSize() and the frequency of the ticks and labels with GetXaxis().SetNdivisions().

1 Like

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?.

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

gStyle->SetLabelSize(0.08, "x");
gStyle->SetLabelSize(0.06, "y");
1 Like