Can I add the ending numbers of time series data in GPLOT? For example,
data _;
do t=1 to 100;
x+rannor(1);
output;
end;
run;
symbol i=join;
proc gplot;
plot x*t;
run;
quit;
SAS generates the left one without the ending number of "x," while the right one is from MS Excel with the ending number 4.5 added manually.
Thanks for your consideration.
For example
data _;
do X=1 to 100;
Y+rannor(1);
output;
end;
run;
data ANNO;
retain XSYS '1' YSYS '2' FUNCTION 'label' POSITION '6';
set _ end=LASTOBS;
if LASTOBS;
X=100;
TEXT=catt(Y,4.1 -l);
run;
symbol i=join;
proc gplot data=_ anno=ANNO;
plot Y*X;
run;
quit;
For example
data _;
do X=1 to 100;
Y+rannor(1);
output;
end;
run;
data ANNO;
retain XSYS '1' YSYS '2' FUNCTION 'label' POSITION '6';
set _ end=LASTOBS;
if LASTOBS;
X=100;
TEXT=catt(Y,4.1 -l);
run;
symbol i=join;
proc gplot data=_ anno=ANNO;
plot Y*X;
run;
quit;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.