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 Day 14 4.90 4.60 5.79 6.65 4.81 7.51 5.74 5.51 6.78 4.49 4.03 4.94 Day 42 5.30 5.04 6.44 4.77 4.15 7.84 4.40 3.34 6.13 4.94 4.81 5.11 Day 70 6.05 4.91 6.84 5.15 3.91 6.83 5.81 5.17 6.65 5.09 4.29 5.90 Day 98 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; /*--Create template for graph--*/ proc template; define statgraph lipid; begingraph / designwidth=5in designheight=3in; entrytitle 'Median of Lipid Profile by Visit'; layout overlay / yaxisopts=(griddisplay=on label='Median with 95% CL') xaxisopts=(display=(ticks tickvalues)); scatterplot x=day y=p_med / discreteoffset=-0.15 yerrorlower=p_lcl yerrorupper=p_ucl markerattrs=graphdata1(symbol=circlefilled) errorbarattrs=graphdata1(pattern=solid thickness=2); scatterplot x=day y=a_med / discreteoffset=-0.05 yerrorlower=a_lcl yerrorupper=a_ucl markerattrs=graphdata2(symbol=circlefilled) errorbarattrs=graphdata2(pattern=solid thickness=2); scatterplot x=day y=b_med / discreteoffset= 0.05 yerrorlower=b_lcl yerrorupper=b_ucl markerattrs=graphdata3(symbol=circlefilled) errorbarattrs=graphdata3(pattern=solid thickness=2); scatterplot x=day y=c_med / discreteoffset= 0.15 yerrorlower=c_lcl yerrorupper=c_ucl markerattrs=graphdata4(symbol=circlefilled) errorbarattrs=graphdata4(pattern=solid thickness=2); seriesplot x=day y=p_med / discreteoffset=-0.15 name='ps' lineattrs=graphdata1(pattern=solid); seriesplot x=day y=a_med / discreteoffset=-0.05 name='pa' lineattrs=graphdata2(pattern=solid); seriesplot x=day y=b_med / discreteoffset= 0.05 name='pb' lineattrs=graphdata3(pattern=solid); seriesplot x=day y=c_med / discreteoffset= 0.15 name='pc' lineattrs=graphdata4(pattern=solid) ; discretelegend 'ps' 'pa' 'pb' 'pc' / location=inside valign=top halign=right across=1; endlayout; endgraph; end; run; ods listing; ods graphics / reset imagename='Lipid_Profile'; proc sgrender data=lipid template=lipid; run;