Why don't you use SetXTitle and SetYTitle, i.e. :
m_2dHist_m2VsMy->SetXTitle("#mu (GeV)")
m_2dHist_m2VsMy->SetYTitle("M_{2} (GeV)")
Vincent
On Wednesday 17 December 2003 02:13, Christian Hansen wrote:
> Dear Rooters,
>
> Since I did not manage to write Latex code in my axis titles
> I tried TLatex for the axis titles instead. However, I encountered
> two problems;
>
> 1) I did not manage to turn the text for the y-axis around. I tried
>
> TLatex* text = new TLatex();
> text->SetTextSize(0.03);
> text->DrawLatex(0.45,0.05," #mu (GeV) ");
> text->PaintLatex(0.05,0.5,1.57,0.03," M_{2} (GeV) ");
> text->DrawLatex(0.05,0.5," M_{2} (GeV) ");
>
> but even though I'm trying to put theta to 1.57 the M_2
> is still written horisontally instead of vertically.
>
> 2) If I before the line with TLatex* draw the histogram
>
> m_2dHist_m2VsMy->Draw("CONTZ");
> TLatex* text = new TLatex()
>
> I get the error message
>
> Error in <TGaxis::PaintAxis>: wmin (0.033741) == wmax (0.033741)
>
> and both the texts (mu and M2) ends up in the same place in
> the Canvas.
>
> If anyone could help me with these problems or how to write Latex code for
> the axis titles I would be very greatful.
>
> Cheers
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET