Position of legend

Hi,

I’m trying to set the position of my legend but no matter what numbers I use I can not get it to move. I draw my histograms then I have:

TLegend Ratio(0.1, 0.2, 0.75, 0.4, "");
 Ratio.SetX1NDC(0.35);
 Ratio.SetX2NDC(1.0);
 Ratio.SetY1NDC(0.8);
 Ratio.SetY2NDC(0.6);
 Ratio.SetTextSize(0.04);
 Ratio.AddEntry(corrData_adcE_L, "Corrected data 1" ,"l");
 Ratio.AddEntry(corrData_adcL_E, "Corrected data 2" , "l");
 Ratio.Draw();

Any ideas on where I’m going wrong?

Thanks,

Lisa

The position of a legend is defined when you create it: Example:

{
   TFile f("hsimple.root");
   hpx->SetFillColor(48);
   hpx->SetMarkerStyle(20);
   hpx->SetMarkerSize(1);
   hpx->Draw("HP");
   TLegend *leg=new TLegend(0.2,0.2,0.4,0.4);
   leg->AddEntry(hpx,"hpx","fp");
   leg->SetTextFont(132);
   leg->SetHeader("Legend");
   leg->SetTextFont(42);
   leg->Draw();
}