BookmarkSubscribeRSS Feed
_sba_
Calcite | Level 5

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 ?

 

_sba__1-1617288592572.png

 

 

Any advice is welcome!

Thanks!

 

2 REPLIES 2
PGStats
Opal | Level 21

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;

PGStats_0-1617297003866.png

 

PG
_sba_
Calcite | Level 5

thanks a lot really helpful ! Many thanks !

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 327 views
  • 6 likes
  • 2 in conversation