Reputation: 35
The data I'm trying to plot is temperature against datetime (in SAS datetime format), over a month. I'd like the interval on the x-axis to be an hour, or a day. Do you know what to put where I've put the question mark in the code below?
Thanks!
%macro makeplot;
proc sgplot data = temp.heating;
where dwelling = 8 & room = 1;
series x = datetime y = temp;
*xaxis values = (&start_date_time to &end_date_time by ?);
run;
%mend makeplot;
%makeplot;
Upvotes: 1
Views: 1248
Reputation: 2460
SAS datetimes store seconds, so 86400 will give you days, and 3600 will give you hours.
Upvotes: 1