Tips to Customize SAS/GRAPH... for Reluctant Beginners et al. Claudine Lougee, Dualenic, LLC, Glen Allen, VA

Similar documents
Modifying Graphics in SAS

IMPROVING A GRAPH USING PROC GPLOT AND THE GOPTIONS STATEMENT

The Plot Thickens from PLOT to GPLOT

Effective Forecast Visualization With SAS/GRAPH Samuel T. Croker, Lexington, SC

Chapter 13 Introduction to Graphics Using SAS/GRAPH (Self-Study)

Coders' Corner. Paper ABSTRACT GLOBAL STATEMENTS INTRODUCTION

It s Not All Relative: SAS/Graph Annotate Coordinate Systems

SAS/GRAPH Introduction. Winfried Jakob, SAS Administrator Canadian Institute for Health Information

Want Quick Results? An Introduction to SAS/GRAPH Software. Arthur L. Carpenter California Occidental Consultants

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

Tips and Tricks in Creating Graphs Using PROC GPLOT

INTRODUCTION TO THE SAS ANNOTATE FACILITY

Picturing Statistics Diana Suhr, University of Northern Colorado

A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

CHAPTER 1 Introduction to SAS/GRAPH Software

A Generalized Procedure to Create SAS /Graph Error Bar Plots

The Evolution of a SAS/GRAPH Application Jenine Eason, AutoTrader.com, Atlanta, GA

Paper SIB-096. Richard A. DeVenezia, Independent Consultant, Remsen, NY

SAS Graph: Introduction to the World of Boxplots Brian Spruell, Constella Group LLC, Durham, NC

SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA

Arthur L. Carpenter California Occidental Consultants

The GTESTIT Procedure

Six Cool Things You Can Do In Display Manager Jenine Milum, Charlotte, NC Wachovia Bank

Splitting Axis Text. Splitting Text in Axis Tick Mark Values

Something for Nothing! Converting Plots from SAS/GRAPH to ODS Graphics

Using MACRO and SAS/GRAPH to Efficiently Assess Distributions. Paul Walker, Capital One

The G3GRID Procedure. Overview CHAPTER 30

Interactive Graphs from the SAS System

Reverse-engineer a Reference Curve: Capturing Tabular Data from Graphical Output Brian Fairfield-Carter, ICON Clinical Research, Redwood City, CA

The GANNO Procedure. Overview CHAPTER 12

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

SUGI 29 Posters. Paper A Group Scatter Plot with Clustering Xiaoli Hu, Wyeth Consumer Healthcare., Madison, NJ

PharmaSUG 2012 Paper CC13

Controlling Titles. Purpose: This chapter demonstrates how to control various characteristics of the titles in your graphs.

New Visualization in V8.2

How to annotate graphics

The GSLIDE Procedure. Overview. About Text Slides CHAPTER 27

ABSTRACT. The SAS/Graph Scatterplot Object. Introduction

Presentation Quality Graphics with SAS/GRAPH

Multiple Graphical and Tabular Reports on One Page, Multiple Ways to Do It Niraj J Pandya, CT, USA

A Plot & a Table per Page Times Hundreds in a Single PDF file

Multiple Forest Plots and the SAS System

Using SAS/GRAPH Software to Create Graphs on the Web Himesh Patel, SAS Institute Inc., Cary, NC Revised by David Caira, SAS Institute Inc.

How Managers and Executives Can Leverage SAS Enterprise Guide

Innovative Graph for Comparing Central Tendencies and Spread at a Glance

Introduction to SAS/GRAPH Statistical Graphics Procedures

ABC s of Graphs in Version 8 Caroline Bahler, Meridian Software, Inc.

Data Driven Annotations: An Introduction to SAS/GRAPH s Annotate Facility

Paper Time Contour Plots. David J. Corliss, Wayne State University / Physics and Astronomy

The GIMPORT Procedure

Graphics. Chapter Overview CHAPTER 4

Data Annotations in Clinical Trial Graphs Sudhir Singh, i3 Statprobe, Cary, NC

Using Annotate Datasets to Enhance Charts of Data with Confidence Intervals: Data-Driven Graphical Presentation

SAS: Proc GPLOT. Computing for Research I. 01/26/2011 N. Baker

Paper CC01 Sort Your SAS Graphs and Create a Bookmarked PDF Document Using ODS PDF ABSTRACT INTRODUCTION

PharmaSUG 2015 Paper PO03

Graphical Techniques for Displaying Multivariate Data

Tips for Producing Customized Graphs with SAS/GRAPH Software. Perry Watts, Fox Chase Cancer Center, Philadelphia, PA

Time Contour Plots. David J. Corliss Magnify Analytic Solutions, Detroit, MI

SparkLines Using SAS and JMP

Information Visualization

ODS The output delivery system

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Paper S Data Presentation 101: An Analyst s Perspective

The GREMOVE Procedure

Create Flowcharts Using Annotate Facility. Priya Saradha & Gurubaran Veeravel

THE IMPACT OF DATA VISUALIZATION IN A STUDY OF CHRONIC DISEASE

Making Presentations More Fun with DATA Step Graphics Interface (DSGI) Hui-Ping Chen, Eli Lilly and Company, Indianapolis, Indiana

Move =(+0,+5): Making SAS/GRAPH Work For You

ODS LAYOUT is Like an Onion

Rafe M. J. Donahue, Ph.D. Associate Director, Statistics BioMimetic Therapeutics, Inc. Franklin, TN

PharmaSUG Paper TT10 Creating a Customized Graph for Adverse Event Incidence and Duration Sanjiv Ramalingam, Octagon Research Solutions Inc.

Chapter 1 Introduction. Chapter Contents

From Clicking to Coding: Using ODS Graphics Designer as a Tool to Learn Graph Template Language

Purpose: This chapter demonstrates how to create pie charts, and discusses some of the issues to consider when deciding whether to use a pie chart.

A SAS Macro for Generating Informative Cumulative/Point-wise Bar Charts

Paper ###-YYYY. SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI

How to Make an Impressive Map of the United States with SAS/Graph for Beginners Sharon Avrunin-Becker, Westat, Rockville, MD

Creating Population Tree Charts (Using SAS/GRAPH Software) Robert E. Allison, Jr. and Dr. Moon W. Suh College of Textiles, N. C.

SAS/GRAPH 9.4: Java Applets and ActiveX Control User s Guide

Getting Started with the SGPLOT Procedure

Select Cases. Select Cases GRAPHS. The Select Cases command excludes from further. selection criteria. Select Use filter variables

Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

SAS/GRAPH : Using the Annotate Facility

SAMLab Tip Sheet #4 Creating a Histogram

SAS CLINICAL SYLLABUS. DURATION: - 60 Hours

Contents of SAS Programming Techniques

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

ABC Macro and Performance Chart with Benchmarks Annotation

Applied Regression Modeling: A Business Approach

Coders' Corner. Scaling Mount GCHART: Using a MACRO to Dynamically Reset the Scale Nina L. Werner, Dean Health Plan, Inc., Madison, WI.

I KNOW HOW TO PROGRAM IN SAS HOW DO I NAVIGATE SAS ENTERPRISE GUIDE?

Developing Graphical Standards: A Collaborative, Cross-Functional Approach Mayur Uttarwar, Seattle Genetics, Inc., Bothell, WA

What s New in SAS Studio?

Introducing Statistical Graphics (SG): Victoria UG May 2018 Mary Harding SAS Canada

SAS vs. Python How Do They Compare?

One SAS To Rule Them All

Paper Abstract. Introduction. SAS Version 7/8 Web Tools. Using ODS to Create HTML Formatted Output. Background

Using SAS/GRAPH Software to Create Graphs on The Web Himesh Patel, SAS Institute Inc., Cary, NC

Need a Scientific Journal Ready Graphic? No Problem!

Transcription:

Paper SIB-109 Tips to Customize SAS/GRAPH... for Reluctant Beginners et al. Claudine Lougee, Dualenic, LLC, Glen Allen, VA ABSTRACT SAS graphs do not have to be difficult or created by SAS/GRAPH experts. There are ways that graphs can be turned from basic to bold. Simple SAS/GRAPH options are demonstrated in easy steps to show even the beginner programmer or graph user. A few simple tricks may even impress the SAS/GRAPH experts. INTRODUCTION Graphs can be intimidating to some SAS users. The purpose for this paper is to give a general level of detail for adding a few options to SAS graphs. Some very basic level options can turn a graph from basic to bold. Details for changing the axis, text font, color, adding legends or labels, connecting lines on plot graphs will be provided. The examples shown will all use GPLOT, but most options are portable for other types of graphs. SAS/GRAPH is very extensive and this paper only takes a sneak peek at a few statement options. Sample syntax within the paper will be shown as follows: LIBNAME GRAPH C:\SESUG\SEEING IS BELIEVING ; PROC CONTENTS DATA = GRAPH._ALL_; SAS/GRAPH OPTIONS There are many options that can be useful to enhance a graph. The following list of GRAPH statements and options will be used to demonstrate a simple GPLOT Procedure that becomes more visually appealing with a few minor changes. For more SAS/GRAPH options, see the REFERENCES section at the end of the paper. GOPTIONS AXIS ORDER= MINOR=NONE SYMBOL VALUE= INTERPOL= LEGEND= LABEL= ANGLE= FTEXT= HTEXT= GOPTIONS If producing numerous graphs within the same session, it s nice to start with a clean slate for each graph. The GOPTIONS statement is used to control the graph options during a SAS session. The changes will only be in effect during the current session unless the GDEVICE procedure is applied. (GDEVICE will not be discussed.) In order to reset the options during a SAS session, submit the following syntax. GOPTIONS RESET=ALL; 1

AXIS The AXIS statement will help with the appearance of the horizontal and vertical axes within the plots and charts. There are quite extensive options that can be placed on the axis statement. The following is a sample. (Note: Used with GBARLINE, GCHART, GCONTOUR, GPLOT, GRADAR) AXIS1 LABEL = (H=2.5 This is the Axis Label JUSTIFY=CENTER COLOR=BLUE LENGTH=50 WIDTH=1.5); ORDER= The ORDER= option provides specific values for the particular axis specified instead of the processor determining the range based on the dataset input. If your data contains values from 50-80, but you want to see a larger-based range to compare with other data, use the following statement. AXIS1 ORDER = (0 TO 100 BY 10); MINOR The MINOR= option is used for the smaller tick-marks on the axis graph. These smaller tick-marks can be suppressed using =NONE. AXIS1 ORDER = (0 TO 100 BY 10) MINOR=NONE; SYMBOL VALUE The SYMBOL VALUE assigns a type or value for the graph. This is an important option if there is a graph with several lines that need to be distinguished. Some analysts want to see graphs with lots of lines. Once a certain amount of lines are produced on a graph, it is almost impossible to see the data, but using various symbols will assist in finding the right information on the graph produced. SYMBOL VALUE=DOT; INTERPOL= The INTERPOL is the interpolation method used with the symbol statement. Several options exist within separate categories. Categories include: general methods, high-low interpolation methods, regression methods, and spline methods. This paper only covers the general method of JOIN. The author did not have a need for other methods, but the JOIN option is important if the continuous lines need to be formed on a GPLOT graph. SYMBOL VALUE=DOT INTERPOL=JOIN; 2

LEGEND= LEGEND will add a nice and neat legend with data details to the graph output. This is a bit fancy, but some audiences like to see a fancy graph with lots of details. The legend statement also has lots of options as well, including font, color, and position to name a few. LEGEND1 CBORDER=RED POSITION=TOP; LABEL= A label can be added to the LEGEND statement to add even more details. LEGEND1 LABEL = ('LEGEND FOR CLASSES ') CBORDER=RED POSITION=TOP; ANGLE= To make the graph look even cleaner, the LABEL can be placed on an angle of choice. AXIS1 LABEL = (ANGLE=90 "GRADE PERCENTAGE WITHIN A CLASS"); FTEXT= The FTEXT option allows the choice of font for any titles, footnotes, or legend labels. GOPTIONS FTEXT="ARIAL"; HTEXT= HTEXT determines the height or size of the text. GOPTIONS FTEXT="ARIAL" HTEXT=2.5; 3

SOME SAS/GRAPH VISUALS A simple GPLOT graph will not turn any heads or look very interesting, nor does it provide a lot of detail about the information that is being analyzed. PROC GPLOT DATA = CLASS_GRADES; PLOT GRADE* CLASS; QUIT; ORIGINAL GPLOT OUTPUT However, using some of the options discussed with some simple understanding, the ordinary GPLOT graph could be transformed into a legible, detailed output. AXIS1 ORDER = (0 TO 100 BY 10) MINOR=NONE LABEL = (ANGLE=90 "GRADE PERCENTAGE WITHIN A CLASS"); AXIS2 ORDER = (40 TO 100 BY 5) MINOR=NONE; SYMBOL VALUE=DOT INTERPOL=JOIN; GOPTIONS FTEXT="ARIAL" HTEXT=2.5; LEGEND1 LABEL = ('LEGEND FOR CLASSES ') CBORDER=RED POSITION=TOP; PROC GPLOT DATA= GRADE_FREQ; TITLE 'CLASS GRADES FOR COLLEGE COURSE'; FOOTNOTE 'ALL CLASSES ARE ASL (AMERICAN SIGN LANGUAGE)'; PLOT PERCENT*GRADE =CLASS / VAXIS=AXIS1 HAXIS=AXIS2 LEGEND=LEGEND1; QUIT; 4

FINALIZED GPLOT OUTPUT WITH OPTIONS CONCLUSIONS In conclusion, even if someone is not an SAS/GRAPH expert, with some practice and a little bit of effort, graphs can become something visually appealing and perhaps useful to others. And if you don t feel like practicing or putting forth the effort, then ask a SAS/GRAPH expert! REFERENCES SAS Online Docs V9.1.3 www.sas.com www2.sas.com/proceedings/sugi31/239-31.pdf RECOMMENDED READING The following sites were found during the creation of this paper and provide details about SAS/GRAPH and many of the options discussed in the paper at the time of conference. (All sites current at time of paper creation.) http://www.sas.com/technologies/bi/query_reporting/graph/index.html http://www.pauldickman.com/teaching/sas/graph.php http://support.sas.com/rnd/papers/sugi30/p90-30_020105.pdf Any of Ben Cochran s SAS/GRAPH papers or workshops CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Claudine Lougee Dualenic, LLC PO Box 1108 Glen Allen, VA 23060 Phone: 724-467-0559 Email: claudine@dualenic.com Web: http:/www.dualenic.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 5