Non-interpreted TLatex in axis titles

From: Philip Rodrigues <p.rodrigues1_at_physics.ox.ac.uk>
Date: Mon, 25 May 2009 11:51:35 +0100


Hi roottalk,
I'm trying to draw an axis title with low font precision so that the latex isn't interpreted, like this:

root [0] gStyle->SetTitleFont(60)
root [1] TH1F* h=new TH1F("foo", "bar;#int;#int", 10, 0, 1)
root [2] h->Draw()

This puts "#int" on the axes (which is what I want), but the one on the y axis isn't rotated, as usual. I guess this is because TLatex::PaintLatex has:

if (fTextFont%10 < 2) {

      gPad->PaintText(x,y,text1);
      return;

}

which doesn't pass the angle, so it's drawn unrotated. But if I create a TLatex manually and set its font and angle, it *is* rotated:

root [0] TLatex la;
root [1] la.SetTextFont(60)
root [2] la.SetTextAngle(90)
root [3] la.DrawLatex(0.5, 0.5, "#int")

so I'm a little confused as to what's going on.

Anyway, my question is: Is there a way I can get this behaviour (latex not interpreted, text rotated) for the y axis title?

Regards,
Philip Received on Mon May 25 2009 - 12:51:43 CEST

This archive was generated by hypermail 2.2.0 : Mon May 25 2009 - 17:50:01 CEST