I have X axis in a graph on which lumi sections are plotted (1 lumi section = 23.36 sec). I have to convert this X axis into day/month. There are 300000 lumi sections and these need to be plotted over a period from 26 April to 24 October. Can somebody please help me do it?
Actually I am able to set date [Day/month] but the problem that I am facing right now is 300000 lumi sections are considered as 300000 seconds by default and my plot is not showing beyond four days.
Do you know how to fix it?
I used the following to set date axis.
TDatime da(2018,04,26,00,00,00);
int X0 = da.Convert();
gStyle->SetTimeOffset(X0);
TDatime da1(2018,04,26,00,00,00);
int X1 = da1.Convert()-X0;
TDatime da2(2018,10,24,00,00,00);
int X2 = da2.Convert(1)-X0;
It seems you are not using the time axis provided by ROOT as I suggested. That’s right ?
You do not need TGaxis, just proceed like in the timeonaxis*.C examples I pointed before.
If you do not want to use time axis but want to change the X axis labels you can use the ChangeLabel method.