1 / 32

Using PROC SGPLOT for Quick High Quality Graphs

Using PROC SGPLOT for Quick High Quality Graphs. Lora Delwiche Susan Slaughter. ODS Graphics. New with SAS 9.2 Phase 1 Need SAS/GRAPH Statistical procedures now produce graphics New procedures just for graphing SGPLOT SGSCATTER SGPANEL SGRENDER. SGPLOT. 15 types of graphs

alda
Télécharger la présentation

Using PROC SGPLOT for Quick High Quality Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using PROC SGPLOT for Quick High Quality Graphs Lora Delwiche Susan Slaughter

  2. ODS Graphics • New with SAS 9.2 Phase 1 • Need SAS/GRAPH • Statistical procedures now produce graphics • New procedures just for graphing • SGPLOT • SGSCATTER • SGPANEL • SGRENDER

  3. SGPLOT • 15 types of graphs • Simple statements • Can combine graphs • Results in standard image file formats • View graphs in standard viewers • Use ODS styles and destinations

  4. SCATTER

  5. SERIES

  6. STEP

  7. NEEDLE

  8. BAND

  9. REG

  10. LOESS

  11. PBSPLINE

  12. HBOX and VBOX

  13. HISTOGRAM

  14. DENSITY

  15. HISTOGRAM with DENSITY

  16. ELLIPSE with SCATTER

  17. HBAR and VBAR

  18. HLINE and VLINE

  19. VBAR withVLINE

  20. DOT

  21. Does everyone have the handout? • Step-by-step instructions • Tables of selected SGPLOT statements • The workshop materials can be found at http://support.sas.com/events/sasglobalforum/2009/handson

  22. Controlling plot structure • Most plot types • Can add grouping variable • Some plot types have additional options • HISTOGRAM and DENSITY • Scale for axis (percent, count, or proportion) • VBAR and HBAR • Numeric response variable

  23. Controlling graph appearance • LABEL statement • User-defined formats • General SGPLOT options • Legend labels • Transparency settings • Displaying markers (or not)

  24. Controlling graph appearance • Options specific to plot type • REG • Display confidence limits • SCATTER • Label data points • NEEDLE • Baseline value

  25. Optional Statements • Reference lines • X or Y axis • Can add labels • Axis attributes • Labels • Type (Discrete, Linear, Log or Time) • Values for tics • Grid • Insets

  26. Attributes • Markers • Symbol • Color • Size • Lines • Pattern • Color • Thickness • Fill • Color

  27. ODS Destinations • Uses standard ODS destinations • LISTING • HTML • PDF • RTF

  28. ODS Styles • For LISTING destination styles apply to graphs only • Can use any style for example: • ANALYSIS Color • STATISTICAL Color • JOURNAL Gray Scale • JOURNAL2 Black and White

  29. ODS Graphics Editor • Make changes to existing graphs • LISTING destination must be open • SGEDIT ON • SGEDIT OFF • Additional methods in SAS 9.2 Phase 2

  30. SGPANEL • Most statements same as SGPLOT • Just add PANELBY statement • Produces separate plot for each value of PANELBY variable

  31. Recommended paper Secrets of the SG Procedures by Dan Heath, SGF 2009 Find any SAS conference paper at www.lexjansen.com

  32. Any Questions? The Little SAS Book: A Primer Fourth Edition

More Related