introduction to sas/graph don miller 812 oswald tower [email protected] 814-863-3155

14
Introduction to SAS/Graph Don Miller 812 Oswald Tower [email protected] 814-863-3155

Upload: juliana-glenn

Post on 26-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

Introduction to SAS/Graph

Don Miller812 Oswald Tower

[email protected]

Page 2: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

Paris datasets

• Open Windows Explorer (or My Computer)

• Tools – Map Network Drive

• Drive P:

• Folder \\paris\sas_data

• For help [email protected]

• Stat help [email protected]

Page 3: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GPLOT

Page 4: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GPLOT

Page 5: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GPLOT

Page 6: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GPLOT

Page 7: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GPLOT

Page 8: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GCHART

Page 9: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GCHART

Page 10: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GCHART

Page 11: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GCHART

Page 12: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

PROC GCHART

Page 13: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

ODS Statements• Used to create HTML / GIF versions of graphs• Right-click on desktop and create a “Graphs” folder.• Add this to the top of your code (where “miller” is your user name; each of

the quoted values is one line):

ods html body="C:\Documents and Settings\miller\ Desktop\graphs\graphs.html"

gpath="C:\Documents and Settings\miller\ Desktop\graphs\";

• Add this to the bottom of your code:

ods html close;

• You will get a “graphs.html” in your Graphs folder (open with IE).

Page 14: Introduction to SAS/Graph Don Miller 812 Oswald Tower miller@pop.psu.edu 814-863-3155

Other Graphing Concepts• GCHART: After slash (/) in VBAR statement:

DISCRETE forces one bar per value. NOZERO omits bars where the count is 0. SPACE=(#) controls the space between bars. WIDTH=(#) controls the bars’ width.

• PATTERN statements are used to control the color of bars (do a GCHART after these): pattern1 color=red; pattern2 color=orange;

• AXIS statements are used to control the axes: axis1 order=(0 to 20000 by 1000) label=none minor=none; plot finctot*agehofh /vaxis=axis1;