** Shingles Data Set (NKNW 8.9 & 10.14); OPTIONS LINESIZE=75 NOCENTER NONUMBER NODATE; TITLE 'Roofing Shingle Sales'; PROC IMPORT DATAFILE = 'E:\SAS\Shingles.txt' DBMS = dlm OUT = shingles REPLACE; PROC FORMAT; VALUE $trainfmt 'TRUE' = 'Training' 'FALSE' = 'Test'; VALUE potfmt 1 = 'Low' 2 = 'Moderate' 3 = 'High' . = 'Missing' OTHER = 'Miscoded'; VALUE competefmt LOW-<10 = 'Low' 10-HIGH = 'High'; DATA shingles2; set shingles; FORMAT potentcat $8. training $5. compete $4.; compete = put(brands,competefmt.); IF potential > 15 then potentcat = 'High'; ELSE IF potential < 6 then potentcat = 'Low'; ELSE potentcat = 'Moderate'; IF potential > 15 then pot = 3; ELSE IF potential < 6 then pot = 1; ELSE pot = 2; IF _N_ < 27 THEN training = 'TRUE'; ELSE training = 'FALSE'; obsno = _N_; RUN; OPTIONS PAGESIZE = 20; /* for sizing output for LaTeX slides */ FILENAME grafout 'E:\SAS\hbarpot.eps'; goptions RESET=ALL device=pslepsfc GSFNAME=grafout GSFMODE=REPLACE FTEXT=swissb HSIZE = 7IN VSIZE = 4IN; PROC GCHART DATA = shingles2; TITLE 'Breakdown of Region Potential Classes'; FORMAT training $trainfmt. pot potfmt. ; HBAR potentcat / NOSTAT MIDPOINTS = 'Low' 'Moderate' 'High'; RUN; FILENAME grafout2 'E:\SAS\vbarpot.eps'; GOPTIONS GSFNAME=grafout2 COLORS = (CXFF9933 red green) CTEXT = black HSIZE = 7IN VSIZE = 5IN;; PROC GCHART DATA = shingles2; TITLE 'Breakdown of Region Potential Classes'; FORMAT training $trainfmt. pot potfmt. ; VBAR potentcat / CAXIS = black MIDPOINTS = 'Low' 'Moderate' 'High'; RUN; FILENAME grafout3 'E:\SAS\vbarpot2.eps'; GOPTIONS RESET=ALL device=pslepsfc GSFNAME=grafout3 GSFMODE=REPLACE FTEXT=swissb HSIZE = 7IN VSIZE = 5IN;; PATTERN COLOR = CX993366; PROC GCHART DATA = shingles2; TITLE 'Breakdown of Region Potential Classes'; FORMAT training $trainfmt. pot potfmt. ; VBAR potentcat / MIDPOINTS = 'Low' 'Moderate' 'High'; RUN; FILENAME grafout4 'E:\SAS\salespromo.eps'; GOPTIONS device=psepsf GSFNAME=grafout4 GSFMODE=REPLACE COLORS = () FTEXT=swissb HSIZE = 7IN VSIZE = 5IN; PROC GPLOT DATA = shingles2; PLOT sales*promotion; TITLE 'Sales vs Promotion'; RUN; FILENAME grafout5 "E:\SAS\salespromo2.eps"; GOPTIONS device=pslepsfc GSFNAME=grafout5 GSFMODE=REPLACE FTEXT=swissb HSIZE = 7IN VSIZE = 5IN; AXIS1 LABEL = ("Promotion ($1000)"); AXIS2 LABEL = ('Sales' justify=right '(1000s of squares)' ); AXIS3 LABEL = (COLOR = cyan 'Sales' justify=right '(1000s of squares)' ) COLOR = green MINOR = (NUMBER = 3 COLOR = red); footnote j=l "Shingle Sales Data"; PROC GPLOT DATA = shingles2; PLOT sales*promotion / HAXIS=axis1 VAXIS=axis2; TITLE 'Sales vs Promotion'; RUN; FILENAME grafout6 "E:\SAS\salespromott.eps"; GOPTIONS device=pslepsfc GSFNAME=grafout6 GSFMODE=REPLACE FTEXT=swissb HSIZE = 8IN VSIZE = 6.5IN; SYMBOL1 COLOR=blue VALUE=triangle height=1; SYMBOL2 COLOR=CXFF0000 VALUE=plus height=1.5; SYMBOL3 COLOR=green VALUE=+ height=2; LEGEND1 LABEL = ('Potential Category') VALUE = ('Low' 'Moderate' 'High') POSITION = (top left inside); PROC GPLOT DATA=shingles2; PLOT sales*promotion=pot / HAXIS=axis1 VAXIS=axis2 LEGEND = LEGEND1; RUN; FILENAME grafout7 "E:\SAS\salespromoaxis.eps"; GOPTIONS device=pslepsfc GSFNAME=grafout7 GSFMODE=REPLACE FTEXT=swissb HSIZE = 8IN VSIZE = 6.5IN; SYMBOL COLOR = blue VALUE = plus height = 1; PROC GPLOT DATA=shingles2; PLOT sales*promotion / HAXIS=axis1 VAXIS=axis3; RUN; *proc gdevice catalog=sashelp.devices; *RUN; * goptions reset=all device=activex; * proc gtestit picture=1; * run; * quit; QUIT;