An Introduction to PROC GREPLAY

Similar documents
MANAGING SAS/GRAPH DISPLAYS WITH THE GREPLAY PROCEDURE. Perry Watts IMS Health

Generating Participant Specific Figures Using SAS Graphic Procedures Carry Croghan and Marsha Morgan, EPA, Research Triangle Park, NC

Changing Titles on Graphs With Minimal Processing

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

Information Visualization

Usinq the VBAR and BBAR statements and the TEMPLATE Facility to Create side-by-side, Horizontal Bar Charts with Shared Vertical Axes Labels

GENERATING SAS HARD COpy OUTPUT UNDER THE VMS N VAX ENVIRONMENT

Georeferencing and Digitizing

The GANNO Procedure. Overview CHAPTER 12

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

Chapter 27 Saving and Printing Graphics

The GSLIDE Procedure. Overview. About Text Slides CHAPTER 27

A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

c. Michael Dunbam, M.LE.M.S.S. David R. Gens, M.LE.M.S.S.

The GIMPORT Procedure

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

PROC CATALOG, the Wish Book SAS Procedure Louise Hadden, Abt Associates Inc., Cambridge, MA

Information Visualization

SAS/GRAPH : Using the Annotate Facility

A Dynamic Imagemap Generator Carol Martell, Highway Safety Research Center, Chapel Hill, NC

Single click Catalogs Pull down File menu Click on make alias. Drag the alias to the desktop. Click on the application Pull down File to make alias

PagePlus X7. Quick Start Guide. Simple steps for creating great-looking publications.

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

SAS/ASSIST Software Setup

OnePager Pro Quick-Start Guide Version 6.1 September 12, Chronicle Graphics. All Rights Reserved.

ODS LAYOUT is Like an Onion

APPENDIX 2 Customizing SAS/ASSIST Software

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

A Step-by-step guide to creating a Professional PowerPoint Presentation

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

Creating Regional Maps with Drill-Down Capabilities Deb Cassidy Cardinal Distribution, Dublin, OH

DOING MORE WITH WORD: MICROSOFT OFFICE 2013

USING SAS PROC GREPLAY WITH ANNOTATE DATA SETS FOR EFFECTIVE MULTI-PANEL GRAPHICS Walter T. Morgan, R. J. Reynolds Tobacco Company ABSTRACT

Feature PROGRAM Entries FRAME Entries. quickly prototype an'application using the interactive development environment

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

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

Creating Maps in SAS/GRAPH

HOW TO CREATE A POSTER USING Microsoft Office PowerPoint (2007) AN ONLINE TUTORIAL

Microsoft Word 2016 LEVEL 2

The GREMOVE Procedure

Microsoft Word 2007 on Windows

Displaying Multiple Graphs to Quickly Assess Patient Data Trends

The GTESTIT Procedure

Producing Summary Tables in SAS Enterprise Guide

Presentation Quality Graphics with SAS/GRAPH

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

INTRODUCTION TO THE SAS ANNOTATE FACILITY

Overview of SAS/GIS Software

Microsoft Access 5: Reports & Other Useful Functions

QuickStart Guide. Poster Designer Pro QuickStart Guide 1

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

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

Document Editor Basics

DOING MORE WITH WORD: MICROSOFT OFFICE 2007

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

CHAPTER 1 Introduction to SAS/GRAPH Software

Visual Studies Exercise.Topic08 (Architectural Paleontology) Geographic Information Systems (GIS), Part I

imindmap Quick Start Guide PC Users

Can I have the menu please?

Microsoft Excel 2007

Interactive Graphs from the SAS System

Thermacam Reporter 2000 Professional Template Building Tutorial

Graduate Health Sciences Word Topics

Chapter 1. Getting to Know Illustrator

PowerPoint 2002 Manual

TRAINING SESSION Q2 2016

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

Applications Development. Paper 38-28

New, standard features of DesignMerge Pro!

You can also easily drag and drop files from your local computer folders to SharePoint libraries.

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA

6: USING ANCHORED FRAMES

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

INTRODUCTION TO SAS/GRAPH

Content provided in partnership with Que, from the book Show Me Microsoft Office Access 2003 by Steve JohnsonÃÃ

INTERMEDIATE WORD. Class Objective:

USING THE SAS SYSTEM FOR AN ANALYSIS AND REPORTING SYSTEM FOR EFFLUENT MONITORING

Georeferencing Soil Maps in ArcMap 10.x: Basic procedures to download, open, manipulate and print spatial data

SAS/Warehouse Administrator Usage and Enhancements Terry Lewis, SAS Institute Inc., Cary, NC

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

Chapter 3 Managing Results in Projects. Chapter Table of Contents

How to Create Custom Name Badge Inserts with a Mail Merge in Microsoft Word 2007

The Basics of Map Creation with SAS/GRAPH. Mike Zdeb School of Public Health Rensselaer, NY

Fiery Driver for Windows

GIS Virtual Workshop: Creating a Final Map

Font Information Files for Bitstream Soft Fonts

Customer Release Notes Release 8.10

Tips and Tricks in Creating Graphs Using PROC GPLOT

Excel Core Certification

Paper William E Benjamin Jr, Owl Computer Consultancy, LLC

TABLE OF CONTENTS TABLE OF CONTENTS... 1 INTRODUCTION... 3 BREAK... 4 DEFINITIONS... 4 STEP BY STEP- SECTION BREAK... 6 PAGE NUMBERS...

DOING MORE WITH POWERPOINT: MICROSOFT OFFICE 2013

Chapter 10 Working with Graphs and Charts

Microsoft Access Lesson 3: Creating Reports

Agent Central User s Guide

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

Routing Output. Producing Output with SAS Software CHAPTER 6

vis website building a page

Using Mail Merge in Microsoft Word 2003

Artistic Text. Basics 1

Transcription:

An Introduction to PROC GREPLAY Marc Jacobs, AT&T, Basking Ridge, NJ April 20, 1993 PROC GREPLAY is a procedure for redisplaying graphs created using SAS/GRAPH software. With this procedure you can redisplay your graphs on different devices, combine several graphs on a single page or screen, or compose a visual presentation. PROC GREPLAY can help you to make more effective grapbics. PROC GREPLAY can be run in batch, line mode or as a full screen, interactive procedure. Tbis tutorial will get you started using PROC GREPLAY interactively in the SAS display manager. Tbis is a good way to get started. It is assumed that you have some familiarity with SAS, SAS/GRAPH and the display manager. The focus here is not on creating the graphs but on how to make more effective use of those graphs you are already producing. What got me started using PROC GREPLAY was the desire to view a graph on screen before printing without having to run the procedure that created the graph twice. Tbis is useful if your graph required a great deal of processing to create or when they take a long time to print. I also wanted to present more than one graph on a page. With PROC GREPLAY you replay graphs created with other procedures that you have saved in a catalog. Getting started Start by creating a few graphs and saving them in a catalog. In my examples I've used PROC GMAP to produce a few maps of the boroughs of New York City. Once you have the appropriate map dataset the maps are easy to produce. The data on bagel consumption is imaginary. Don't worry about how the graphs themselves were created as any graphs will do. The point here is what you can do with your graphs after they've been generated. proc format; value cntfrnt 5='Bronx' 47=' Brooklyn' 61=' Manhattan' 81=' Queens' 85='Staten Island'; value bglfmt low-2='low' 3-6=' Medium' 7-high=' High' goptions targetdevice=ps device=xcolor rotate=landscape; patternl c=gray88 v=ms; pattern2 c=graybb v=ms; pattern3 c=grayee v=msi proc gmap map=hvs.nyc_r data=bagels geut=nycdata.nyc1; by county; where county in (5,61,47,81); id tract; chore bagels I levels=3 des='bagels by borough'; format bagels bglfmt. county cntfmt. label county='oo'xi run; proc gmap map=hvs.nyc_r data=bagels gout=nycdata.nyc1; where county in (5,61,47,81); id tract; choro bagels I levels=3 des='bagels, NYC'i format bagels bglfmt. county cntfmt. label county='oo'x; 1366

run; proc gslide gout=nydata. nycl des=' title w/apologi'es'; titld h=5 f=centx j=l, New York City' h=4 f=centx j=r 'Bagel Consumption'; footnotel h=3 f=centx j=l 'Prepared by Marc Jacobs' h=2 j=r 'Apologies to Staten Islanders'; run; To save the graphs in. a catalog add the gout= option to the SAS/GRAl'H procedure. These graphs were saved in a permanent catalog nydata. nycl. Once the program has run, the catalog nycdata. nycl will have four maps from the first PROC GMAP (one for each of the by variable, county), a fifth from the second GMAP procedure, and a sixth from the GSLIDE procedure. Look at the goptions statement While you can set the options differently to suit your printer and display, I've chosen these options because my target device, ps, is the postscript printer where I will ultimately produce my output. I can view the graphs on my xcolordisplay and see how they will look on paper. Without the targetdevice option I may find that my graph changed a little when printed. I often also use the nodisplay goption as well. This allows the program to run without interruption for printing or screen displays. PROC GREPLAY Now that you have a catalog of SAS graphs, your ready to start PROC GREPLAY. In the display manager just run proc greplay; to open the replay window. You can enter some of the required information along with the proc greplay command or enter it into the menu. Put the name of the catalog with your graphs in the igout field A list of all the catalog members will appear. When you created the graphs, you had the option of assigning names and descriptions to each of your graphs with the name= and des= options. This helps to make managing and keeping track of catalog entries easier. To display a graph, just put an s in the Sel (select) field next to the entry of your choice, and (gently) bit return. If you want to print the graph, change the Device field to the device name for your printer, put s in the Sel (select) field, and again bit return. To replay them in sequence put s 1, s 2,..., s 3 in the Sel field in the order you desire. Templates Perhaps the most useful feature of PROC GREPLAY is the ability to replay your graphs into templates. A template is a way of dividing your page or screen into different sections or panels. For example, you may want to place two graphs together on a page. With a template you can divide the page into two panels. These can be side by side, top and bottom, or in any position you choose. You then replay a graph into each panel. You can design your own templates or you can make use of the many templates that come with SAS/GRAl'H software. They can be located in the sashelp. tempi t catalog. Browse through these and see if there are templates to suit your purposes. To design your own, enter the name of the catalog where you will save your templates in the TC field, then go to the template edit screen by typing template at the greplay command prompt or chose template catalog from the pull-down menus. After the template window opens, choose edit from the pmenus or type it at the command prompt. Enter a name for the template and you can begin creating your design. You can divide the page into several panels but if the panels are too small you may shrink your graphs to illegibility. There can be space between them or they can overlap. One template that I often use is a single panel covering the entire page and four smaller panels, two across, but leaving space at the top and bottom. I use this to display four graphs with one common title. The one full page panel is for a title and footiiote that corresponds to all four graphs. This is more pleasing than having four graphs with the same title repeated. The panels are defined by a simple coordinate system. The lower left comer of the page is 0,0 and the upper right is 100,100. The template design window has a certain intelligence to aid. you in defining coor- 1367

dinates but it really isn't very difficult. For example, the full page panel has the coordinates (0,0; 0,100; 100,100; 100,0) and a smaller panel in the lower left comer has coordinates (0,10; 0,50; 50,50; 50,10). The y-coordinate starts at 10 instead of 0 to leave room for a footnote. Designing templates is an area where you can be a little creative. The panels need not be rectangular; odd-shaped windows can produce interesting effects. Keep in mind, though, that by changing the x,y scale of your graph you can distort your graph, stretching or shrinking an axis. You can put a frame around a panel by entering a color in the color field. The scale field scales the coordinates, shrinking or expanding a panel. Xlate moves the panel up, down, right, or left by the amount you enter. Rotate will reassign the coordinates so that your graph will be rotated on the page. I found this to be useful for switching between portrait and landscape orientations. Normally, you define the orientation with the rota t e= goption before starting PROC GREPLAY. If you are working in landscape mode then the coordinate 0,0 will be the lower left corner of a page in landscape orientation. To create a panel in portrait orientation while the goptions are set to landscape, ie. to rotate your graph, move the corners of the panel. For example if 0,0 was the lower left then make 0,0 the upper left. Shift all the other corners in the same direction. If this is confusing, try it on paper. Write the coordinates in the comers, then turn the page 90 degrees. Once you have finished your template, preview it in the template preview window. The preview is just the empty outline of your panels. The templates can be saved in a catalog for use with other graphs in other SAS sessions. example, I put the titles from the the gslide procedure in the full page panel, panel 1. The four maps go into panels 2 through 5. Hit return and the graph is ready. PROC GREPLAY is one of the easiest SAS/GRAPH procedure and one of the most useful. You may find it a bit tricky at first but persistence has its rewards. An afternoon spent experimenting can save you a great deal of time later when preparing your graphs for presentation. A few extras Like me, you probably intend your graph to be displayed on paper or overhead transparency, and less often on a display monitor. It is much better to set the targetdevice to the device on which you intend to produce your fina1 result before you create your graphs. It is also a good idea to define a common style that you can apply to all your graphs. Find the title and footnote size and and font that suits your taste. Standardize you axis and legend statements if possible. Sticking with a style helps to keep your graphs looking more consistent across panels. References SAS Institute Inc (1992), SAS;GRAPH Software, Reference, vols 1 &: 2, Version 6, First Edition, Cary, NC: SAS Institute Inc. Acknowledgments SAS and SAS/GRAPH are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. <Ill indicates USA registration. Putting it all together Now that you have your graphs and templates ready, you can start putting things together. Go back to the greplay window, saving your template along.the way. Enter the name of the template catalog in the tc field and the template name in the temp 1 ate field. Instead of entering s in the Se 1 field put the number of the panel in which you want the graph to display. For 1368

Figure 1: Proc Greplay window 1369

FIgure 2: template window 1370 ~-

PRO( @[PlM: T[N~'lAT[ D[SIGN rm Figure 3: template design window 1371

Figure 4: template preview window 1372