Data lipid; label a_med="Drug A" b_med="Drug B" c_med="Drug C" p_med="Placebo"; input Day $ 1-10 a_med a_lcl a_ucl b_med b_lcl b_ucl c_med c_lcl c_ucl p_med p_lcl p_ucl; cards; Baseline 5.21 5.04 5.52 5.17 4.94 5.47 5.24 4.97 5.33 5.08 4.81 5.35 Visit 1 4.90 4.60 5.79 6.65 4.81 7.51 5.74 5.51 6.78 4.49 4.03 4.94 Visit 2 5.30 5.04 6.44 4.77 4.15 7.84 4.40 3.34 6.13 4.94 4.81 5.11 Visit 3 6.05 4.91 6.84 5.15 3.91 6.83 5.81 5.17 6.65 5.09 4.29 5.90 Visit 4 5.20 5.07 5.39 5.28 5.15 5.38 5.35 5.22 5.52 5.10 4.94 5.23 End Point 5.24 4.97 5.48 5.15 5.09 5.42 5.34 5.15 5.53 5.04 4.94 5.22 ; run; proc print; run; /*--Create template for graph--*/ proc template; define statgraph lipid_discrete_outer_stat_color; begingraph / designwidth=6in designheight=3.5in; entrytitle 'Median of Lipid Profile by Visit'; layout lattice / rows=2 rowweights=(0.8 0.2) columndatarange=union; layout overlay / yaxisopts=(griddisplay=on label='Median with 95% CL') xaxisopts=(display=(ticks tickvalues)); scatterplot x=day y=p_med / yerrorlower=p_lcl yerrorupper=p_ucl discreteoffset=-0.15 markerattrs=graphdata1(symbol=circlefilled) errorbarattrs=graphdata1(pattern=solid thickness=2); scatterplot x=day y=a_med / yerrorlower=a_lcl yerrorupper=a_ucl discreteoffset=-0.05 markerattrs=graphdata2(symbol=circlefilled) errorbarattrs=graphdata2(pattern=solid thickness=2); scatterplot x=day y=b_med / yerrorlower=b_lcl yerrorupper=b_ucl discreteoffset= 0.05 markerattrs=graphdata3(symbol=circlefilled) errorbarattrs=graphdata3(pattern=solid thickness=2); scatterplot x=day y=c_med / yerrorlower=c_lcl yerrorupper=c_ucl discreteoffset= 0.15 markerattrs=graphdata4(symbol=circlefilled) errorbarattrs=graphdata4(pattern=solid thickness=2); seriesplot x=day y=p_med / lineattrs=graphdata1(pattern=solid) discreteoffset=-0.15 name='ps'; seriesplot x=day y=a_med / lineattrs=graphdata2(pattern=solid) discreteoffset=-0.05 name='pa'; seriesplot x=day y=b_med / lineattrs=graphdata3(pattern=solid) discreteoffset= 0.05 name='pb'; seriesplot x=day y=c_med / lineattrs=graphdata4(pattern=solid) discreteoffset= 0.15 name='pc'; discretelegend 'ps' 'pa' 'pb' 'pc'; endlayout; layout overlay / walldisplay=none xaxisopts=(display=none) yaxisopts=(display=none); scatterplot x=day y=p_med / markerattrs=(size=0); innermargin; blockplot x=day block=c_med / repeatedvalues=true display=(values label) valueattrs=graphdata4 labelattrs=graphdata4; blockplot x=day block=b_med / repeatedvalues=true display=(values label) valueattrs=graphdata3 labelattrs=graphdata3; blockplot x=day block=a_med / repeatedvalues=true display=(values label) valueattrs=graphdata2 labelattrs=graphdata2; blockplot x=day block=p_med / repeatedvalues=true display=(values label) valueattrs=graphdata1 labelattrs=graphdata1; endinnermargin; endlayout; endlayout; endgraph; end; run; ods listing; ods graphics / reset imagename='Lipid_Profile_Discrete_OuterStat_Color'; proc sgrender data=lipid template=lipid_discrete_outer_stat_color; run;