Greek sympols in histogram

in a leg I want to have greek symbols. so i write #phi_{pt}. in my canvas, it appears exactly as i have written it! i.e. no conversion to greek phi.

const char *LegTxt=“0.5 < #phi_{pt} < 3”;
TLegendEntry *e = Leg0->AddEntry(Hist,Form("%s",LegTxt),"");

I do not see this problem:
Do you have a small reproducer ?


notice that it works on the x-axis but not in the legend!

I believe you have a problem but I cannot reproduce it with:

   auto h = new TH1D("h","h",10,0,1);
   auto l = new TLegend(0.2,0.2,0.4,0.4,"legend");
   TLegendEntry *l1 = l->AddEntry(h,"0.5 < #phi_{pt} < 3","fp");


Which ROOT version are you using ? on which machine ?

It could be because of the font being used. This, for instance:


results (root 5.34/38 on Windows) in no conversion. Try setting the font to a number ending in 2, for example (12, 22, …, see

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.