TGraph with time axis


I would like to make a TGraph where the x axis is in time and the units are in weeks i.e. I will do this


and x = 0 means week 0, x = 1 means week 1, x = 2 means week 2, etc.

I have tried to use


and looked at the documentation in the root manual, but I can’t figure out how to get the units of the x axis to be weeks. Does anyone know?


it is not possible to display in weeks.
but seems to me a normal axis should do it ?

I want to have bins corresponding to one week. I want the x-axis not to be labeled 1, 2, 3, 4, etc. but 1 July 2013, 8 July 2013, 15 July 2013, etc.

Such labelling based on weeks does not exist. The only solution I can think of is to adjust to number of divisions to make in match… not sure it will work.

There is a problem with defining weeks anyways.

Is it that January 01 is the first day of the first week, and new weeks start every seven days from that? Then in later months the first won’t be the first day of a week anymore.

Is it by-week-reset-each-month where the first of the month is a new week, then every seven days?

Is it just that Mondays signal a new week, and you have weird partial weeks at the beginning/end of the year?

Or is it an ISO week?

Depending on your answer, it may be trivial using some methods.