How can I right align text on the canvas?

Hi:

Try:

latex.SetTextAlign(32)
latex.DrawLatexNDC(0.95, 0.6, str1)
latex.DrawLatexNDC(0.95, 0.5, str2)

See documentation about text alignment here:
https://root.cern/doc/master/classTAttText.html#ATTTEXT1

2 Likes