Consider this example:
TCanvas * c = new TCanvas;
TH1 * h = new TH1F("h", "h", 5, 0.0, 5.0);
h -> Draw();
TLatex * latex = new TLatex;
latex -> DrawLatex(0.5, 0.5, "latex");
latex -> SetTextAngle(45);
The output is
I set latex -> SetTextAngle(45);
but apparently it hasn’t worked. What is wrong?
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
Hello,
I believe our graphics expert @couet will be able to provide an answer once he is back from vacation.
Shouldn’t the configuration (here, latex->SetTextAngle(45);
) come before the Draw() action?
couet
4
This macro works for me:
{
TH1F *h = new TH1F("h","h",5,0,5);
h->Draw();
TLatex * tex = new TLatex(.5,.5,"latex");
tex->SetTextAngle(45.);
tex->Draw();
}
1 Like
system
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.