Hi Miro, In ROOT, only high level objects, such as TH1xx and TGraph understand log scales. You can use a TGraph instead of a TLine or give the log(x) as argument. Rene Brun Miroslav Helbich wrote: > > Hi rooters, > > I think this is a bug. When drawing lines on log scale, the lines are > displaced. > > I'm using version 3.01/05 for SuSE Linux 6.3 (i386) - Kernel 2.2.16 > (pts/1). > > Miro > > { > > TH1F *hh = new TH1F("hh","test",100,-10.,10.); > TF1 *ff = new TF1("ff","2.",-10.,10.); // constant function > > hh->FillRandom("ff",1000.); > > Float_t ymax=hh->GetMaximum(); > > TLine *l1 = new TLine(0.,0.,0.,ymax); > > TCanvas *c1 = new TCanvas("c1"); > c1->Divide(1,2); > > c1->cd(1); > > hh->Draw(); > l1->Draw(); > > c1->cd(2); > gPad->SetLogy(); > > hh->Draw(); > l1->Draw(); > > }
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET