Need to add a horizontal line at y=1

Hello,

I am trying to add a horizontal line at y=1 in the bottom pad (in ratio plot). I am trying using

   TLine *line = new TLine(0,0.2,1,0.2);
   line->SetLineWidth(2);
   line->SetLineColor(kGreen);
   line->Draw();

But this is not working. I am attaching my code as well as plot. Please suggest what I am doing wrong?

Thanks.
CompareAdvanced.C (3.4 KB)
c1.pdf (15.8 KB)

TLine *line = new TLine(100, 1, 800, 1); or gPad->Modified(); gPad->Update(); // make sure gPad is updated TLine *line = new TLine(gPad->GetUxmin(), 1, gPad->GetUxmax(), 1); or something like TLine *line = new TLine(0.1, 0.5, 0.9, 0.5); line->SetNDC(kTRUE);