I have a time-series dataset[time=i; Y=tsvar], attached.
I need have multiple reference at column=refind,
AND if refcolor=max, color=lime, if refcolor=min, color=blue.
Thanks,
libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
data have;
set x._test;
if refcolor='max' then max=refind;
if refcolor='min' then min=refind;
run;
proc sgplot data=have ; *dattrmap=mymap;
series x=i y=tsvar /lineattrs=(color=red thickness=2 pattern=solid);
refline max/axis=x lineattrs=(thickness=2 pattern=solid color=lime) ;
refline min/axis=x lineattrs=(thickness=2 pattern=solid color=blue) ;
run;
Please post the code you use for your graph.
I think we need to see the code that creates data set MYMAP. Please post code in the proper code box (it has the little running man icon) as you did in earlier threads.
libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
data have;
set x._test;
if refcolor='max' then max=refind;
if refcolor='min' then min=refind;
run;
proc sgplot data=have ; *dattrmap=mymap;
series x=i y=tsvar /lineattrs=(color=red thickness=2 pattern=solid);
refline max/axis=x lineattrs=(thickness=2 pattern=solid color=lime) ;
refline min/axis=x lineattrs=(thickness=2 pattern=solid color=blue) ;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.