Hi Damir,
This suggestion solves my problem, but only if I call it from the
interpreter. What is wrong with adding the lines:
gStyle->SetTimeOffset(0);
gROOT->ForceStyle();
at the beginning of my code.
What about doing:
h_rep_time->Draw(); // draw my histogram
and then calling the two lines above? This doesn't seem to work either?
To make this work, I have to open the file, draw my histogram then call
the two lines, and redraw. Seems a bit odd...
mike
> Hi Mike,
>
> You should set the time offset to 0 via
> gStyle->SetTimeOffset(0);
>
> Time offset is here to be able to plot small time scales (seconds)
> beginning at any time (9 digit seconds for UTC)
>
> 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
>
> On Tue, 26 Nov 2002, Mike Kordosky wrote:
>
> > Hi,
> >
> > I'm making a plot with time on the horizontal axis. The test code uses
> > the following dates:
> >
> > Start time: Tue Jan 1 00:00:00 2002
> >
> > End time: Wed Jan 1 00:00:00 2003
> >
> > Point 1: Mon Apr 1 00:00:00 2002
> >
> > Point 2: Sat Jun 1 00:00:00 2002
> >
> > The function used to print these here is std::asctime().
> >
> > I use the listed start and end times, in time_t format, to set the axis
> > limits of a TH1F and then I fill the two points (also in time_t format).
> > Upon drawing the histogram I see the year 2027 rather than 2002 (or 2003).
> >
> > Can someone point out my error?
> >
> > I've included my test code which compiles and runs with my system which
> > is:
> >
> > RedHat 7.2 on a pc
> > GCC 3.2
> > ROOT from CVS on Nov 6, 2002, 2050 geneva time.
> >
> > Thanks,
> >
> > Mike Kordosky
> >
> > --
> > Graduate Research Assistant // High Energy Physics Lab
> > kordosky@hep.utexas.edu // University of Texas at Austin
> > kordosky@fnal.gov //
> > ph: (512) 471-8426 (RLM Lab, Office)
> > (512) 475-8673 (ENS Lab)
> >
>
--
Graduate Research Assistant // High Energy Physics Lab
kordosky@hep.utexas.edu // University of Texas at Austin
kordosky@fnal.gov //
ph: (512) 471-8426 (RLM Lab, Office)
(512) 475-8673 (ENS Lab)
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET