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
Array
whereas
Code:
tsline Y , tlabel(1300)
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)
I have browsed the help for tlabel but cannot find the right example.
Any idea?
0 Response to Time of day labels in tempogram
Post a Comment