Re: [ROOT] TPad::SetLogx() does not work on TMarker

From: lijowski@cosray2.wustl.edu
Date: Wed Jul 19 2000 - 22:59:48 MEST


  Aihong,

  Use TGraph instead TMarker on log  plots.

   Michal 

> From owner-roottalk@pcroot.cern.ch Wed Jul 19 20:48:54 2000
> Delivered-To: lijowski@cosray2.wustl.edu
> X-Authentication-Warning: pcroot.cern.ch: majordomo set sender to owner-roottalk@root.cern.ch using -f
> Date: Wed, 19 Jul 2000 16:07:51 -0400 (EDT)
> From: Aihong Tang <aihong@cnr.physics.kent.edu>
> X-Sender: aihong@cnr
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] TPad::SetLogx() does not work on TMarker
> MIME-Version: 1.0
> 
> Hi,
> 
> I am trying to insert TMarker into histogram and draw with logx axis. The
> following code shows that SetLogx() does  not work with TMarker. 
> 
> void logTest(){
>   TCanvas* c1= new TCanvas("c1");
>   c1->SetLogx(1);
>   c1->Draw();
>   c1->cd();
> 
>   TH1F* h1 = new TH1F ("h1","h1",10,0,10);
>   h1->SetMaximum(11);
> 
>   for (Int_t i=0; i<10; i++) {
>      TMarker* mk = new TMarker(i,i,20);
>      h1->GetListOfFunctions()->Add(mk);
>   }
> 
>   h1->Draw("AP");
>   c1->Update();
> }
> 
> 
> I admitt that there is a work around for this purpose by SetBinContent() 
> and draw the histogram, but in my analysis code I have to use TMarker. 
> 
> Thank you for any help.
> 
> Aihong
> P.S. I am using ROOT_LEVEL : 2.25.00  on linux machine.
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET