I named the pads as ax1 (main plot), ax2 (first pull plot), ax3 (second and last pull plot). As you can see, both the main plot ylabel and the second pull plot xlabel title are too close to the axis numbers. I tried the following command for the ax3 pad:
with truratio_graph being the graph plotted in ax3. And it had no effect on the plot .pdf or .png. But when I access the .root, and change the SetTitleOffset() from 1.4 (default) to any other number it works to an extent. I mean, the title moves away from the y-axis but it gets pushed out of the canvas, as you can see below:
I tried to increase the figure size, but it did not solve the problem. I tried to increase the Bottom margin of the Canvas with:
But it didn’t work either. (can i do it in the .root file? I mean, change the canvas bottom margin in TBrowser?).
The same happens to the y label title in ax1, I changed the .SetTitleOffset() but it didn’t have any effect, but I can change it in the .root file, the main problem is that the x label title in ax3 gets out of the canvas, and I don’t know how to solve that, so I would appreciate any help or tips.
The code that I am using to make the plot is a bit extensive, but if needed I can make a minimal reproducible example.
Without your code it’s hard to guess what you have (and you mention y axis but use SetBottomMargin instead of SetLeftMargin), but probably you need to set the margins on the pads, not just the canvas. Check out this example: https://root.cern/doc/v610/canvas2_8C.html
But the yaxis label in both pull plots got too 'tight. Do you know how can I instead of 0,1,2… have the label numbered as 0,2,4 ?.
And just another thing. if you look at my .pdf output of the image, there is a black line below the last pull plot. This line is not plotted in the .png or .root outputs. Any idea of what may be happening?