GetY2 in log scale

Hi,

I would like to draw a vertical line on the Frame of an histogram. The problem is, that the value given by TFrame->GetY2() is reduced by the log scaling… does anybody has an idea ?

Here is a code sample :

canDeltaTrig = new TCanvas("DeltaTrig","DeltaTrig");
deltaTrig->Draw(); // is a TH1F
can->Update();
TLine *borne=new TLine(-14,0,-14,gPad->GetFrame()->GetY2());
borne->Draw();
gPad->SetLogy();

Thanks.

You can make a TLine using the values you see on the axis as limits. At drawing time the log will be automatically taken if needed.