I’m having what I think is a simple problem with TRatioPlot. If I set the TitleSize of the three axes (Upper and Lower y axis; Lower x axis) too large, the labels are partially cut out of the final plot. That is: I need to tell TRatioPlot to increase the canvas/pad sizes to accommodate the larger sized titles.
I tried a lot of options but couldn’t get it to work.
I attach a self contained python3 script which will reproduce the problem.
In the script titlesize=0.06 leads to titles outside of the canvas while titlesize=0.04 seems fine.
I know one can fudge with offsets (in the actual plot I’m trying to generate this is not enough) but I’d like to understand how to increase the size of the canvas/pad itself.
import sys, os, shutil
import ROOT as ROOT
from ROOT import *
titlesize = 0.06
c1 = ROOT.TCanvas(“c1”,“c1”)
h1 = ROOT.TH1F(‘h1’,‘h1_name’,100,-3,3)
h2 = ROOT.TH1F(‘h2’,‘h2_name’,100,-3,3)
rp = TRatioPlot(h1, h2)
if titlesize is too large it is cut out of the canvas
test_ratioplot.pdf (29.2 KB)