I have a very simple problem, but am not able to figure out an elegant solution.
Attached I have a plot (test.png) , which shows a TCanvas with 6 pads.
I’ve written a script (test.C) and attached it as well.
What I would like to do is :
Add a TLatex as a headline above to top 3 pads, to serve as the headline
for all 6 pads. (TLatex in the script file)
Add a TLegend also above ( if possible in between the top and bottom pads)
I just need one TLegend object, since all the markers etc. are the same anyway. (TLegend file in the script file)
Thanks in advance,
Use the normalized coordinates:
TLatex * tex = new TLatex(0.5,0.5,"TEXT");
Thanks for the reply.
But I am already doing right after the TLatex definition :
and also tried your suggestion, but that does not work…
I attached a plot, which I changed by hand to show what I mean.
TCanvas *c = new TCanvas("c","c");
TPad p("p","p",0,0,1,1); p.Draw(); p->cd();
TLatex t1(.5,.95,"TITLE HERE");
TLatex t2(.5,.5,"LEGEND HERE");
t1.SetTextAlign(21); t1.SetNDC(); t1.Draw();
t2.SetTextAlign(21); t2.SetNDC(); t2.Draw();