Re: [ROOT] Time axis using TGaxis ... confused

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Aug 18 2003 - 08:53:39 MEST


Hi Zaldy,

When using the time representation, the time axis is in seconds.
In your case, you specify a range of 2000s that is less than one day.
Change 2000 to 200000 for example.

Rene Brun

zaldy wrote:
> 
> Dear ROOTers,
> 
> Why does the ff. code produces an axis label with only a single value:
> 
> TCanvas * myCan = ...
> myCan->Range(0,0,30,390);
> 
> TGaxis * xaxis = new TGaxis(2,20,28,20,0,2000,2405,"t");
> TDatime da(2003,02,15,12,00,00);
> xaxis->SetTimeOffset(da.Convert());
> xaxis->SetTimeFormat("%d\/%m\/%Y");
> xaxis->Draw();
> 
> I should expect the result similar to:
> http://root.cern.ch/root/HowtoTimeAxis.html
> 
> 
> But the result is: 15/02/2003 is the only time coordinate shown for
> all primary divisions 1, 2, 3, ...
> 
> Did I missed something here?
> Why do I have a different result than the one given in the website?
> 
> Thank you ...
> 
> PS. root version 3.05/05 gcc3.3.2 RedHat 9.0
> --
> 
> --------------------------------------------------------
>                    Zaldy A. Nawang
>                    PS Users Room 2
>                    Yon Gokan,
>                    E362, Neutrino Group,
>                    IPNS, KEK,
>                    Japan
> 
>                    e-mail: zaldy@neutrino.kek.jp
>                    Tel. No. : (81) 029864 - 5387
> --------------------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET