Getting Started with the Graph Template Language in SAS

Book description


You've just received a new survey of study results, and you need to quickly create custom graphical views of the data. Or, you've completed your analysis, and you need graphs to present the results to your audience, in the style that they prefer. Now, you can create custom graphs quickly and easily with Getting Started with the Graph Template Language in SAS, without having to understand all of the Graph Template Language (GTL) features first.

This book will get you started building graphs immediately and will guide you toward a better understanding of the GTL, one step at a time. It shows you the most common approaches to a variety of graphs along with information that you can use to build more complex graphs from there. Sanjay Matange offers expert tips, examples, and techniques, with a goal of providing you with a solid foundation in using the GTL so that you can progress to more sophisticated, adaptable graphs as you need them.

Ultimately, Getting Started with the Graph Template Language in SAS allows you to bypass the learning curve. It teaches you how to quickly create custom, aesthetically pleasing graphs that present your data with maximum clarity and minimum clutter.

This book is part of the SAS Press program.

Table of contents

  1. About This Book
  2. About The Author
  3. Acknowledgments
  4. Chapter 1: Introduction to SAS ODS Graphics
    1. 1.1 A Brief History of SAS ODS Graphics
    2. 1.2 Automatic Graphs from SAS Procedures
    3. 1.3 What Is the SAS Graph Template Language (GTL)?
    4. 1.4 Why Should You Learn GTL?
    5. 1.5 Making Graphs Using the Statistical Graphics (SG) Procedures
    6. 1.6 Making Graphs Using the ODS Graphics Designer
    7. 1.7 Data Sets and Custom Styles Used in This Book
    8. 1.8 Color and Gray-scale Graphs
    9. 1.9 Effective Graphics and the Use of Decorative Skins
    10. 1.10 SAS 9.2, SAS 9.3, and SAS 9.4 Features
  5. Chapter 2: Introduction to SAS Graph Template Language
    1. 2.1 Getting Started
    2. 2.2 Creating a Simple GTL Graph
    3. 2.3 Components of GTL
    4. 2.4 GTL Graph Terminology
    5. 2.5 Plots
      1. 2.5.1 Basic Plots
      2. 2.5.2 Categorical Plots
      3. 2.5.3 Distribution Plots
      4. 2.5.4 Fit Plots
      5. 2.5.5 Parametric Plots
      6. 2.5.6 3-D Plots
      7. 2.5.7 Other Plots
    6. 2.6 Layouts
      1. 2.6.1 BEGINGRAPH
      2. 2.6.2 LAYOUT OVERLAY
      3. 2.6.3 LAYOUT REGION (SAS 9.3)
      4. 2.6.4 LAYOUT OVERLAYEQUATED
      5. 2.6.5 LAYOUT OVERLAY3D
      6. 2.6.6 LAYOUT GRIDDED
      7. 2.6.7 LAYOUT LATTICE
      8. 2.6.8 LAYOUT DATALATTICE
      9. 2.6.9 LAYOUT DATAPANEL
      10. 2.6.10 LAYOUT PROTOTYPE
    7. 2.7 Titles, Footnotes, and Entries and Unicode
    8. 2.8 Axes
    9. 2.9 Legends
    10. 2.10 Attribute Maps
    11. 2.11 Dynamics and Macro Variables
    12. 2.12 Expressions and Conditionals
    13. 2.13 Styles and Plot Attributes
    14. 2.14 Draw Statements
    15. 2.15 Annotation
    16. 2.16 Summary
  6. Chapter 3: Building Your First Graph
    1. 3.1 Overview
      1. 3.1.1 Terminology
    2. 3.2 Starting with a Basic Histogram
    3. 3.3 Adding Normal and Kernel Density Curves
    4. 3.4 Setting Plot Properties
    5. 3.5 Adding a Legend
    6. 3.6 Adding the Title and Footnote
    7. 3.7 Adding a Separate Horizontal Box Plot
    8. 3.8 Using Uniform X-Axes
    9. 3.9 Using Common External X-Axis
    10. 3.10 Setting Output Options
    11. 3.11 Full Code for the Graph
    12. 3.12 Review
    13. 3.13 Summary
  7. Chapter 4: Creating Single-Cell Graphs
    1. 4.1 Overview
      1. Equated Plot
      2. 3-D Plot
    2. 4.2 Basic Plots
      1. 4.2.1 Scatter Plot
      2. 4.2.2 Series Plot
      3. 4.2.3 Step Plot
      4. 4.2.4 Band Plot
      5. 4.2.5 High Low Plot (TYPE = Line)
      6. 4.2.6 High Low Plot (TYPE = Bar)
      7. 4.2.7 Bubble Plot
      8. 4.2.8 Needle Plot
      9. 4.2.9 Vector Plot
    3. 4.3 Categorical Plots
      1. 4.3.1 Bar Chart
      2. 4.3.2 Axis Table (SAS 9.4)
      3. 4.3.3 Line Chart
      4. 4.3.4 Pie Chart
    4. 4.4 Distribution Plots
      1. 4.4.1 Histogram
      2. 4.4.2 Density Plots
      3. 4.4.3 Box Plot – Horizontal - Discrete
      4. 4.4.4 Box Plot – Vertical – Interval with Groups
    5. 4.5 Fit Plots
      1. 4.5.1 Regression Plot
      2. 4.5.2 Loess Plot
      3. 4.5.3 Penalized B-Spline Plot
      4. 4.5.4 Ellipse Plot
    6. 4.6 Other Plots and 3-D Plots
      1. 4.6.1 Reference Line and Drop Line
      2. 4.6.2 Heat Map Parametric Plot
      3. 4.6.3 Line Parametric and Ellipse Parametric Plots
      4. 4.6.4 Contour Plot
      5. 4.6.5 3-D Surface Plot
      6. 4.6.6 3-D Bivariate Histogram
    7. 4.7 Real World Examples
      1. 4.7.1 Model Fit Plot
      2. 4.7.2 Distribution Plot
    8. 4.7.3 Survival Plot
  8. Chapter 5: Creating Multi-Cell Graphs
    1. 5.1 Overview
    2. 5.2 Layout Data Lattice
      1. 5.2.1 Row and Column Data Lattice
      2. 5.2.2 Column Data Lattice with Union-All Data Range
      3. 5.2.3 Column Data Lattice with Union Data Range
      4. 5.2.4 Proportional Data Lattice
      5. 5.2.5 Data Lattice with Side Bar
      6. 5.2.6 Row Data Lattice
      7. 5.2.7 Data Lattice with Multi-Page Output
    3. 5.3 Layout Data Panel
      1. 5.3.1 Two Class Data Panel
      2. 5.3.2 Data Panel with One Class Variable
      3. 5.3.3 Data Panel with One Class Variable and Number of Columns
      4. 5.3.4 Data Panel with One Class Variable, Columns, and Union
      5. 5.3.5 Data Panel with One Class Variable and Proportional Columns
      6. 5.3.6 Data Panel with Side Bar
      7. 5.3.7 Data Panel with Multi-Page Output
    4. 5.4 Layout Lattice
      1. 5.4.1 Row Lattice with Independent Axes
      2. 5.4.2 Row Lattice with Common Axis
      3. 5.4.3 Row Lattice with Common Axis and Unequal Weights
      4. 5.4.4 Column Lattice with Column Headings
      5. 5.4.5 Nested Lattice
      6. 5.4.6 Gridded Layout with Embedded Statistics Table
    5. 5.5 Real World Examples
      1. 5.5.1 Lab Values by Study Week
      2. 5.5.2 LFT Safety Panel, Baseline versus Study
      3. 5.5.3 Most Frequent On-Therapy Adverse Events by Relative Risk
    6. 5.5 Summary
  9. Chapter 6: Customizing Axes, Legends, and Text
    1. 6.1 Overview
    2. 6.2 Axes
      1. 6.2.1 Common Axis Features
      2. 6.2.2 Linear Axis Features
      3. 6.2.3 Discrete Axis Features
      4. 6.2.4 Log Axis Features
      5. 6.2.5 Time Axis Features
    3. 6.3 Legends
      1. 6.3.1 Discrete Legend
      2. 6.3.2 Continuous Legend
    4. 6.4 Adding Titles, Footnotes, and Entries
      1. 6.4.1 Titles and Footnotes
      2. 6.4.2 Entries
    5. 6.4 Summary
  10. Chapter 7: Attribute Maps, Draw, and Annotate
    1. 7.1 Overview
    2. 7.2 Discrete Attribute Maps
      1. 7.2.1 Discrete Attributes Map – Line Attributes
      2. 7.2.2 Discrete Attributes Map – Fill Attributes
    3. 7.3 Range Attribute Maps
      1. 7.3.1 Range Attributes Map – Discrete Colors
      2. 7.3.2 Range Attributes Map – Gradient Colors
    4. 7.4 Inline Draw Statements
      1. 7.4.1 Draw Text
    5. 7.5 Data Set Based Annotation
      1. 7.5.1 Data Set Based Annotation
    6. 7.6 Summary
  11. Chapter 8: Styles, ODS Options, and More
    1. 8.1 Overview
    2. 8.2 Style, Style Elements, and Attributes
    3. 8.3 Frequently Used ODS Options
      1. ODS Graphics Options
      2. ODS Destination Options
    4. 8.4 Macro Variables, Dynamics, Conditionals, and Functions
      1. 8.4.1 Macro Variables
      2. 8.4 2 Dynamics
      3. 8.4.3 Conditionals
      4. 8.4.4 Function Evaluation
    5. 8.5 Summary
  12. Index

Product information

  • Title: Getting Started with the Graph Template Language in SAS
  • Author(s): Sanjay Matange
  • Release date: October 2013
  • Publisher(s): SAS Institute
  • ISBN: 9781612908502