Hi there,
I am trying to plot a tempogram, where on the X-axis I have the time of the day (24hr) and on the Y-axis I have the proportion of individuals commuting.
I have formatted the time variable as a %tc+HH+MM and set the data to be a time-series.
I am struggling to label the X-axis correctly though.
Working example:
Will produce this plot for which I don't like the labels:

whereas
will produce the wrong label, implying that I am misspecifying it

Other attempts such as
fail miserably with invalid label specifier, error messages issued by Stata.
I have browsed the help for tlabel but cannot find the right example.
Any idea?
I am trying to plot a tempogram, where on the X-axis I have the time of the day (24hr) and on the Y-axis I have the proportion of individuals commuting.
I have formatted the time variable as a %tc+HH+MM and set the data to be a time-series.
I am struggling to label the X-axis correctly though.
Working example:
Code:
clear all input str40 times float Y "0:00" 0.05 "8:00" 0.5 "13:00" 0.2 "17:00" 0.7 "22:00" 0.1 end ge time = clock(times, "hm") format time %tc+HH+MM tsset time, format(%tc+HH+MM) tsline Y
whereas
Code:
tsline Y , tlabel(1300)
Other attempts such as
Code:
tsline Y , tlabel(13:00)
Code:
tsline Y , tlabel(01jan1960 13:00:00)
Code:
tsline Y , tlabel(01jan1960_13:00:00)
I have browsed the help for tlabel but cannot find the right example.
Any idea?
Comment