Re: [ROOT] Re: time labels

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Fri Jul 21 2000 - 17:44:08 MEST


Eddy,

This could be done but needs some work to determine the relation axis
length <-> format natural length. As I said, it is on my todo list.
For the time being, and in your very particular case, you can circumvent
the problem by adding a few hours or days to your offset. This should
change the position of ticks unnoticeably and give you the correct set
1/84, 1/86, 1/88, 1/90 etc...

Cheers

Damir

Eddy Offermann wrote:
> 
> Hi Damir,
> 
> First of all, you did a very nice job on the alpha-numeric labeling of the
> axes !!
> 
> Concerning the label positioning the following:
> I assume that we all want the axis ticks to be equidistantly spaced.
> However, in the attached eps file , I show a plot of a time series where
> as a consequence the labels are not what you really want (01/84 12/85 01/88
> instead of 01/84 01/86 01/88).
> A possible work-around could be to modify the code in TGaxis.C a bit
> so that in
> 
>                if (OptionTime) {
>                   timed = Wlabel + (int)(gStyle->GetTimeOffset());
>                   timelabel = (time_t)((Long_t)(timed));
>                   utctis = gmtime(&timelabel);
>                   strftime(LABEL,36,timeformat.Data(),utctis);
>                   first = 0; last=strlen(LABEL)-1;
> 
>  timelabel is modified such that in case of "%m%y" it is rounded to the
>  nearest year where for "month" we use the month of the first label.
>  Eddy
> >
> > Anton Fokin wrote:
> > >
> > > Yes, this is exactly what I meant in the first mail. October label should
> start at 1st of October as well as 10h should start at 10.00 but there should be
> only one such label on the axis. Do we understand each other now?:)
> > >
> >
> > I suppose so. There is still some parsing to be done on the format
> > string to know what the user wants to print and see the adequation with
> > the axis length. This will not be done immediately but I put it on my
> > todo list.
> >
> > Cheers
> >
> > Damir
> >
> > --
> > =====================================================================
> > | Damir Buskulic                  | Universite de Savoie/LAPP       |
> > |                                 | Chemin de Bellevue, B.P. 110    |
> > | Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
> > | e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
> > =====================================================================
> > mailto:buskulic@lapp.in2p3.fr
> 
> Eddy A.J.M. Offermann
> Renaissance Technologies Corp.
> 25 East Loop Rd.
> Suite 211
> Stony Brook, NY 11790
> e-mail: eddy@rentec.com
> phone: (516)246-5550
> fax: (516)246-5761
> 
>   ------------------------------------------------------------------------
> 
>                    Name: p1.eps
>    p1.eps          Type: Postscript Document (APPLICATION/postscript)
>                Encoding: BASE64
>             Description: p1.eps

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr



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