Hi, any idea how can I do to program the below in SAS ? I mean, the sections in yellow and red that are based on 'y' values of 54 mg/dL, 70 mg/dL, 180 mg/dL and 250 mg/dL ?
Any advice is welcome!
Thanks!
An example:
data graph;
set sashelp.stocks;
where stock="IBM";
v6min=min(6000000, volume);
v12max=min(15000000, max(volume, 12000000));
v15max=max(15000000, volume);
run;
proc sgplot data=graph noautolegend;
series x=date y=volume;
band x=date lower=v6min upper=6000000 /
fillattrs=(color=green) nooutline noextend;
band x=date lower=12000000 upper=v12max /
fillattrs=(color=yellow) nooutline noextend;
band x=date lower=15000000 upper=v15max /
fillattrs=(color=red) nooutline noextend;
refline 6000000 12000000 15000000/ axis=y label=("Low" "Mid" "High") labelloc=inside;
xaxis offsetmax=0.1;
quit;
thanks a lot really helpful ! Many thanks !
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.