y*****w 发帖数: 1350 | 1 In SAS, how to make the X-axis labels as in the attached graph? The raw data
I have is per minute (or the clock time like 12:00:00) along days. Thanks! | w*******n 发帖数: 469 | | s*****a 发帖数: 2735 | 3 axis1 label=none order=(1 to 13)/*??x axis 的范围*/
value=(j=c "12AM" " " "12PM" " ""12AM" " ""12PM" " ""12AM"
" ""12PM" " ""12AM");
/* ..... */
proc gplot;
plot var1*var2 / haxis = axis1;
run;
/* ???可行 *// | y*****w 发帖数: 1350 | 4 Thanks for the above responses. I have worked it out in the AXIS statement
using the same idea as shincha suggested, but the actual data is recorded as
real clock time like 12:04:37 (although every minute), so the actual
numbers in the ORDER option are very large (i.e. 24x3600=86400 per day). By
the way, due to the long days in the actual data, I won't need the minor
ticks.
I also added t=1, t=2, ... (see below) --- is this necessy?
axis1 minor=none label=none
order=(0 to n*86400 by 43200) /* n is the number of days */
value=(t=1 j=c "12AM"
t=2 j=c "12PM"
t=3 j=c "12AM"
t=4 j=c "12PM"
...); | s*****a 发帖数: 2735 | 5 in my own opinion, "t=xx" is not necessary, unless you need an additional
line for each value label.
I will make a new variable (1 to 13) instead of using "12:04:37" "xxx", (
just my $0.02).
as
By
【在 y*****w 的大作中提到】 : Thanks for the above responses. I have worked it out in the AXIS statement : using the same idea as shincha suggested, but the actual data is recorded as : real clock time like 12:04:37 (although every minute), so the actual : numbers in the ORDER option are very large (i.e. 24x3600=86400 per day). By : the way, due to the long days in the actual data, I won't need the minor : ticks. : I also added t=1, t=2, ... (see below) --- is this necessy? : axis1 minor=none label=none : order=(0 to n*86400 by 43200) /* n is the number of days */ : value=(t=1 j=c "12AM"
| y*****w 发帖数: 1350 | 6 I don't understand why it should be (1 to 13). As I mentioned, the data
point can be on any of the 86400 time points on a day.
【在 s*****a 的大作中提到】 : in my own opinion, "t=xx" is not necessary, unless you need an additional : line for each value label. : I will make a new variable (1 to 13) instead of using "12:04:37" "xxx", ( : just my $0.02). : : as : By
| s*****a 发帖数: 2735 | 7 sorry, did not read your post carefully.
but why not making a new variable instead? var_new=old_time/86400 (or 43200)?
anyway, it is good to know you fixed the value label.
【在 y*****w 的大作中提到】 : I don't understand why it should be (1 to 13). As I mentioned, the data : point can be on any of the 86400 time points on a day.
|
|