Re: Drawing vertical lines on histogram

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Thu, 2 Feb 2012 10:04:32 +0000


Try:

TCanvas c
 gPad->DrawFrame(0,1e-9,1,1)
 c->SetLogy(1)
TLine l(0.5,1e-8,0.5,1)
l->Draw()

it works for me

On Feb 2, 2012, at 10:57 AM, Aamer Wali Rauf wrote:

I am afraid it doesn't work, for example I have log range from 10^-8 to 1.



From: Olivier Couet
Sent: 01 February 2012 16:52
To: Aamer Wali Rauf
Cc: roottalk_at_root.cern.ch<mailto:roottalk_at_root.cern.ch> Subject: Re: [ROOT] Drawing vertical lines on histogram

root [0] hpx->Draw()
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1

root [1] c1->SetLogy(1)
root [2] TLine l(0,1,0,100)
root [3] l.Draw()


On Feb 1, 2012, at 4:42 PM, Aamer Wali Rauf wrote:

Hi,

How can you draw vertical lines on a histogram with logarithmic y-axis?

Thanks,
Aamer Received on Thu Feb 02 2012 - 11:04:37 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 03 2012 - 23:50:01 CET