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:
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
Will produce this plot for which I don't like the labels:
Array
whereas
Code:
tsline Y , tlabel(1300)
will produce the wrong label, implying that I am misspecifying it
Array
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)
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?