/*************Figure 1***************************/ proc sgplot data=sasdata.knobs; hbar action; run; /*************Figure 2***************************/ /* This command tells SAS to write the frequencies to a data set called frequencies */ ods output OneWayFreqs=frequencies; /* Now compute and output the frequencies*/ proc freq data=sasdata.knobs; tables diameter; run; /* Now produce the needle plot */ proc sgplot data=frequencies; needle x=diameter y=frequency; run; /*************Figure 3***************************/ proc univariate data=sasdata.armspan; ods select histogram; var height; histogram height/vscale=count endpoints=140 to 204 by 8; run; /*************Figure 9***************************/ proc univariate data=sasdata.transform; ods select histogram Moments BasicMeasures; var life; histogram life/vscale=count endpoints=0 to 120 by 15; run; /*************Figure 12**************************/ data stopwatch; input time @@; *The @@ tells SAS to look for the next observation on the same line; cards; 133 143 144 167 172 240 ; run; proc sgplot data=stopwatch; hbox time; run; proc sgplot data=stopwatch; vbox time; run; /*************Figure 13**************************/ proc ttest data=sasdata.transform; var life; ods select SummaryPanel; run; /*************Figure 16**************************/ proc sgplot data=sasdata.bread1; vbox weight/category=scale; run;