bar_pie - AMC 17 3 3350 0 AMC 22 . 2640 0 Audi 17 5 2830 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o *********************************************************************; ** **; ** COURSE: STAT 6360 **; ** PURPOSE: Show how to draw bar/pie charts **; *********************************************************************; * *The following title will appear as the first line of every page in the output window; title1 'STAT 6360'; t *We create vertical Bar Charts with proc gchart and the vbar statement. The program below creates a vertical bar chart for BloodType; b title2 'Simple Vertical Bar Chart'; proc gchart data=sasdata.blood; vbar BloodType; run; r *We create a horizontal bar chart for BloodType; * title2 'Simple Horizontal Bar Chart'; proc gchart data=sasdata.blood; hbar BloodType; run; r *We create a bar chart for BloodType with height being the average WBC; title2 'Report on average RBC'; proc gchart data = sasdata.blood; vbar BloodType / sumvar = WBC type = mean mean descending; run; r DATA sasdata.auto; INPUT make $ mpg rep78 weight foreign ; CARDS; AMC 22 3 2930 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: AMC 17 3 3350 0 AMC 22 . 2640 0 Audi 17 5 2830 1 Audi 23 3 2070 1 BMW 25 4 2650 1 Buick 20 3 3250 0 Buick 15 4 4080 0 Buick 18 3 3670 0 Buick 26 . 2230 0 Buick 20 3 3280 0 Buick 16 3 3880 0 Buick 19 3 3400 0 Cad. 14 3 4330 0 Cad. 14 2 3900 0 Cad. 21 3 4290 0 Chev. 29 3 2110 0 Chev. 16 4 3690 0 Chev. 22 3 3180 0 Chev. 22 2 3220 0 Chev. 24 2 2750 0 Chev. 19 3 3430 0 Datsun 23 4 2370 1 Datsun 35 5 2020 1 Datsun 24 4 2280 1 Datsun 21 4 2750 1 ; RUN; R *We create pie chart for variable make; TITLE2 'Pie Chart for Variable Make'; PROC GCHART DATA=sasdata.auto; PIE make/ VALUE=INSIDE PERCENT=INSIDE SLICE=OUTSIDE; RUN; R *We create pie chart for variable rep78; TITLE2 'Pie Chart for Variable Make'; PROC GCHART DATA=sasdata.auto; PIE rep78/ DISCRETE VALUE=INSIDE PERCENT=INSIDE SLICE=OUTSIDE; RUN; R *We create pie chart for variable make; TITLE2 'Pie Chart for Variable Make'; PROC GCHART DATA=sasdata.auto; PIE rep78/ VALUE=INSIDE PERCENT=INSIDE SLICE=OUTSIDE; RUN;...
View Full Document

Page1 / 2

bar_pie - AMC 17 3 3350 0 AMC 22 . 2640 0 Audi 17 5 2830 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online