RE: Time on x axis.

From: Bertrand Bellenot <Bertrand.Bellenot_at_cern.ch>
Date: Mon, 8 Aug 2005 16:50:03 +0200


Ooops ! I forgot attachment...Here it is. Sorry.

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch
[mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Marina Giunta Sent: Monday, August 08, 2005 3:25 PM
To: roottalk (Mailing list discussing all aspects of the ROOT system) Subject: [ROOT] Time on x axis.

Hello,
I have a simple root macro working fine under Linux, but not under Windows. I read some time values from an Oracle db and I want to display the time labels with a given format on the x axis. The code is the following (the program crashes when reaching the line: graph->GetXaxis()->SetTimeDisplay(1); without that line it works, but the x-axis have labels showing the time as a Uint number):  

TGraph *graph = new TGraph(nrows,tVect, yVect);

graph->Draw("AL");

graph->GetXaxis()->SetLabelOffset(0.02);

graph->GetXaxis()->SetLabelSize(0.04);

graph->GetXaxis()->SetTimeFormat("#splitline{%d\/%b\/%Y}{ %H:%M:%S}");

graph->GetXaxis()->SetTimeDisplay(1);

gPad->Modified();  

Any idea about what could be the problem?

                                         Marina



c1.gif
Received on Mon Aug 08 2005 - 16:50:09 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET