Features: |
DEVICE statement TREPLAY statement |
data sasuser.class (drop=name ); length Gender $ 6; set sashelp.class; if sex="F" then Gender="Female"; else Gender="Male"; run; proc sort data=sasuser.class out=sasuser.class; by weight height; run;
goptions reset=all hsize=2.75in vsize=2.06in;
ods html close; ods listing;
axis1 label=none style=0 major=none value=none; axis2 label=("Age"); axis3 label=("Height") order=50 to 75 by 5; axis4 label=("Weight") order=50 to 150 by 25 minor=(n=1);
legend1 label=none value=("Male" "Female") Position=(right middle outside) across=1; legend2 label=none value=("Male" "Female");
symbol i=join;
proc gchart data=sasuser.class gout=sasuser.excat; vbar age/discrete hminor=0 subgroup=gender inside=freq raxis=axis1 maxis=axis2 noframe legend=legend1; run; hbar age/ discrete sumvar=height mean meanlabel="Avg.Height" vminor=0 raxis=axis1 maxis=axis2; run; pie gender/ noheading legend=legend1 percent=inside; run; proc gplot data=sasuser.class gout=sasuser.excat; plot height*weight=gender/ vminor=1 vaxis=axis3 haxis=axis4 legend=legend2; run; quit;
goptions reset=all hsize=5.5in vsize=4.12in;
proc greplay gout=sasuser.excat igout=sasuser.excat nofs tc=sashelp.templt template=l2r2; device win; treplay 1:gchart 2:gchart1 3:gchart2 4:gplot; quit;
ods listing close; ods html;
data sasuser.class (drop=name ); length Gender $ 6; set sashelp.class; if sex="F" then Gender="Female"; else Gender="Male"; run; proc sort data=sasuser.class out=sasuser.class; by weight height; run;
axis1 label=none style=0 major=none value=none; axis2 label=("Age"); axis3 label=("Height") order=50 to 75 by 5; axis4 label=("Weight") order=50 to 150 by 25 minor=(n=1);
legend1 label=none value=("Male" "Female") Position=(right middle outside) across=1; legend2 label=none value=("Male" "Female");
proc gchart data=sasuser.class gout=sasuser.excat; vbar age/discrete hminor=0 subgroup=gender inside=freq raxis=axis1 maxis=axis2 noframe legend=legend1; run; hbar age/ discrete sumvar=height mean meanlabel="Avg.Height" vminor=0 raxis=axis1 maxis=axis2; run; pie gender/ noheading legend=legend1 percent=inside; run; proc gplot data=sasuser.class gout=sasuser.excat; plot height*weight=gender/ vminor=1 vaxis=axis3 haxis=axis4 legend=legend2; run; quit;