Let say I created a canvas, and I would like to modify the NDC of the title for the histogram.
the following code did not work and I got AttributeError: 'TObject' object has no attribute 'SetX1NDC'.
Using ROOT.gPad.Update() or Modified() also did not work.
please help
c = r.TCanvas("c","title",600,600)
histogram.Draw()
tpave = c.GetPrimitive('title')
tpave.SetX1NDC(0.3)
tpave.SetX2NDC(0.6)
c.Draw()
I’m not sure there’s an option in NDC, but in any case I would remove the automatic titles with SetOptTitle(0) and draw my own titles at any position with TText or TLatex, which give more control anyway.