TText and latex formula


I’m doing plots and I use the TText object to write something into the plots. But I have the problem that I cannot write formulas.
If I do

t = TText(0,200,"#tilde{g}")

I do not see the tilde, but I see the plain test “#tilde{g}”.

Does anyone have an idea?


You can use TLatex instead of TText

Yes you must use TLatex not TText. See:

There is many examples there…