Changing Titles on Graphs With Minimal Processing

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

UTILIZING SAS TO CREATE A PATIENT'S LIVER ENZYME PROFILE. Erik S. Larsen, Price Waterhouse LLP

ODS LAYOUT is Like an Onion

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

A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

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

An Introduction to PROC GREPLAY

INTRODUCTION TO SAS/GRAPH

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

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

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

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

Displaying Multiple Graphs to Quickly Assess Patient Data Trends

Presentation Quality Graphics with SAS/GRAPH

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

PharmaSUG 2015 Paper PO03

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

Innovative Graph for Comparing Central Tendencies and Spread at a Glance

Developing a Dashboard to Aid in Effective Project Management

Producing Publication Quality Business Graphs with SASIGRAPH Software

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

Graphically Enhancing the Visual Presentation and Analysis of Univariate Data Using SAS Software

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

Top Award and First Place Best Presentation of Data Lan Tran-La. Scios Nova, Inc. BLOOD PRESSURE AND HEART RATE vs TIME

* Produce "Executive Presentations"

Dynamic Macro Invocation Utility Paul D Sherman, San Jose, CA

GENERATING SAS HARD COpy OUTPUT UNDER THE VMS N VAX ENVIRONMENT

A STATISTICAL MODEL FOR CLONAL PROLIFERATION "Left Branch" Tree Synthesis of Randomly Dividing Cells Alive at a Fixed Time Horizon

The GANNO Procedure. Overview CHAPTER 12

Using the SQL Editor. Overview CHAPTER 11

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

The GSLIDE Procedure. Overview. About Text Slides CHAPTER 27

Producing Summary Tables in SAS Enterprise Guide

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

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

SAS/GRAPH : Using the Annotate Facility

The GTESTIT Procedure

PowerPoint Essentials

Beginning Tutorials. Introduction to SAS/FSP in Version 8 Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

April 4, SAS General Introduction

Creating a Brochure in Publisher

A Picture Is Worth A Thousand Data Points - Increase Understanding by Mapping Data. Paul Ciarlariello, Sinclair Community College, Dayton, OH

The GIMPORT Procedure

Volume is m 3 0f H 2. SAS/GRAPH" Odds and Ends; Little Things That Make a Big Difference. Arthur L. Carpenter ABSTRACT TEXT OPTIONS IN TITLES

Introduction. Understanding SAS/ACCESS Descriptor Files. CHAPTER 3 Defining SAS/ACCESS Descriptor Files

Manage Duplicate Records in Salesforce PREVIEW

EZViewer DCM Installation

Using Personal Computers as Host Graphics Devices

SkBlraborgs Ian SpArdjup

All-In-One E-Sticker Installation and User Guide (Mac Versions)

Simple Google Shopping. End user instructions

PharmaSUG Paper DG07

Creating Maps in SAS/GRAPH

Microsoft Expression Web Quickstart Guide

Basic E-Sticker Pack User Guide

This lesson is part 5 of 5 in a series. You can go to Invoice, Part 1: Free Shipping if you'd like to start from the beginning.

Quick Start Instructions for Using Postage $aver for Parcels for Mac with Filemaker Pro files

An Introduction to SAS/FSP Software Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California

CHAPTER 1 Introduction to SAS/GRAPH Software

Week 05 Class Activities

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

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

4 + 4 = = 1 5 x 2 = 10

Changing Button Images in Microsoft Office

SAS/ASSIST Software Setup

SAS Data Libraries. Definition CHAPTER 26

Loading Data. Introduction. Understanding the Volume Grid CHAPTER 2

So, Your Data are in Excel! Ed Heaton, Westat

Table of Contents. Part I WageLoch Control 3. Part II WageLoch Roster 20. Contents. Foreword 0. 4 Deleting... a previous roster

Close Your File Template

1182 Index. batch mode 28 BCOLOR= option TITLE, FOOTNOTE, and NOTE statements

NSCC SUMMER LEARNING SESSIONS MICROSOFT OFFICE SESSION

When Simpler is Better Visualizing Laboratory Data Using SG Procedures Wei Cheng, Isis Pharmaceuticals, Inc., Carlsbad, CA

Using Macros to Construct Overlaid Contour Plots For Response Surface Optimization

Introduction to Google Drive and Google Docs

Best Practice for Creation and Maintenance of a SAS Infrastructure

Mac. Logo Guidelines March 2018

SAS Studio: A New Way to Program in SAS

PowerPoint Essentials 1

Mail Merge Word 2016

CHAPTER 13 Importing and Exporting External Data

SAS Visual Analytics Environment Stood Up? Check! Data Automatically Loaded and Refreshed? Not Quite

Technical Paper. Defining an OLEDB Using Windows Authentication in SAS Management Console

Figure 1: My Blocks are blue in color, and they appear in the Custom palette in NXT-G.

INTRODUCTION TO THE SAS ANNOTATE FACILITY

How To Manage Disk Effectively with MPG's Performance Navigator

Changing Projects! Thanks to All. Passenger Lists. Passenger Lists and Naturalization Records. Highlights. Ruler

PSU Object Reports: Introduction. Object Reports: Introduction. Understanding Object Reports. Creating Your Object Report. A Time-Saving Process

Online Ordering Guide

Create Your Résumé on Our Template... 2 General Résumé Tips... 2 Which Résumé Format Should I Choose?... 2 Working with our Template Formatting

Using SAS/GRAPH Software to Analyze Student Study Habits. Bill Wallace Computing Services University of Saskatchewan

A Guided Tour Through the SAS Windowing Environment Casey Cantrell, Clarion Consulting, Los Angeles, CA

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

... WHERE. AnnotaI8 Data.S... XSYS & YSYS. Harie Annotate: How Not to Lose Your Head When Enhancing BAS/GRAPH output

Routing Output. Producing Output with SAS Software CHAPTER 6

DBLOAD Procedure Reference

Copyright 2004, Mighty Computer Services

Word 2010 Getting Started with Word. Introduction. Getting to know Word The Ribbon. Video: Exploring Your Word 2010 Environment

Import Facebook events into your Outlook calendar

Transcription:

Changing Titles on Graphs With Minimal Processing Deb Cassidy, Computer Horizons Corporation, Indianapolis, IN Have you ever created numerous graphs only to have someone make a "minor" change in the title such as changing "Appendix 12.1" to "Appendix 12.2"? While it only takes seconds to change" I" to "2", it may take a considerable time to run the joh. This is especially true in the pharmaceutical industry where there can be hundreds of graphs generated from one small program. This paper will show you a two-step process to reduce the processing time. The ftrst step is to create and store your graphs without the title. The second step is to create the title and print the graphs. Each time the title is changed you just repeat the second step. You only need to repeat the ftrst step if some part of the graph itself or the data changes. This method can also be used to put multiple graphs on a page and have one "main" title over all the graphs. Goptions When you create your graphs, you must have the GOUTMODE option set to APPEND or you will erase your graphs from the catalog when you run the next graph. It doesn't matter if it is the same program or a different program. REPLACE is needed when you send you graphs to some printers or graphic stream files. Other options will depend upon you system and the graphs you are creating. Some sites will set defaults for you which are different that the Institute-supplied defaults. You'll probably need different options for creating/storing the graphs and printing them. STEP I - Create the graph Create the graph as you normally would except for the ftrst title. If there is only going to be one graph on a page, I put in a blank title: TITLEI F=DUPLEX H=3 ; This will leave space for the ftrst title. Be sure to use the same fom and height as you will in the real title so the spacing is correct If you don't use the blank title line, you will need to modify Step 2 as shown below. Graphs will be stored in a catalog. You'll need to verify how to create a catalog on your operating system and version. Some systems will automatically create the catalog for you. You can store data and graphs in the same place but some sites require separate meso Mter the catalog is created, nse a LIBNAME statement to reference it LIBNAME GRAPHS 'MYID.GRAPHS.CATALOG'i When you create the graph, you will use the GOUT option to save it For example: PROC GPLOT DATA=ONE GOUT=GRAPHS.STUDYAi PLOT w=group I NAME::: I RESWK' ; The graph will be stored in catalog STUDY A in the location indicated by the LIBREF GRAPHS. Within STUDY A, the speciftc graph name is RESWK. STEP 2 - Create titles and print graphs (This paper assumes the printing part will be a batch job.) Create the title and store it in the same catalog as the graphs from Step 1. FRoe GSLIDE GOUT=GRAPHS.STUDYA NAME=TITLEli TITLE F=DUPLEX H=3 'Appendix 1.7'; RUN; To combine the graphs and print them: FRoe GREPLAY IGOUT=GRAPHS.STUDYAi TC=TEMPi TDEF ONEBOX 1/ LLX=O LLY=O ULX=O ULY=100 URX=100 URY=100 LRXdOO- LRY=O; TEMPLATE ONEBOX; TREPLAY l:titlel l:reswk; The original graph and the newly created title will be overlaid using a template. 1041

The PROC GREPLA Y creates the template and combines the graphs. TC=1EMP refers to a template catalog name 1EMP. Since it is a onelevel name, it only exists for this program. You can also create permanent template catalogs by using a two-level name such as GRAPHS.1EMP. The TDEF statement defines the template. I've named the template ONEBOX. For each panel, specify the coordinates at the corners with 0,0 representing the lower-left-hand comer and 100,100 representing the upper-right-hand corner. Be careful when you specify the coordinates or you can create some very distorted graphs. The 1EMPLA 1E statement identifies which one to use for the graphs. The TREPLA Y statement indicates to "replay" the graphs using a template. Place graph TI1LEI in Panel I and place graph RESWK in Panel I of the template. SAS doesn't care that both graphs are in the same panel. When you need to change the Appendix number, you will just need to change the PROC GSLIDE and run Step 2 with the GSLIDE and REPLAY PROCs. There is no need to run Step I again. When a graph with a specified name already exists, SAS gives the new graph a different name. To avoid this, use the following before you create you new title. PRoe GREPLAY IGOUT=GRAPHS.STUDYA NOPS; DELETE TITLE!; You can include this as part of your first run and SAS will give you a message indicating the graph does not exist. Storing Templates If you store your template permanently with a two-level name in TC= when you defme it, you don't need to repeat the definition. You can use: PRoe GREPLAY IGOUT=GRAPHS.8TUDYA; TC=GRAPHS. TEMP; TEMPLATE ONEBOXi TREPLAY l:titlel l:reswkj Some people prefer to always defme the template within the program so you can confirm the template coordinates that were actually used. If you store templates in a catalog, be sure you have strict guidelines on who can edit existing templates or you might fmd some unusual graphs appearing in the next run. Templates do not need to be stored ill the same catalog as the graphs but all graphs you are displaying must be in the same catalog. Modify SteP 2 for Title Space If you don '( reserve a blank space for the title, you'll need to modify the template by creating two panels. The panel for the graph will need to be a little smaller than the title panel. PRoe GREPLAY IGOUT=GRAPHS.STUDYA; TC=TEMP; TDEF BOXTTLE 1/ LLX=O LLY=O ULX=O ULY=100 URX=lOO URY=100 LRX=100 LRY=O 21 LLX=O LLY=O ULX=O ULY=90 URX=lOO URY=90 LRX=100 LRY=O;,TEMPLATE BOXTTLEi TREPLAY l:titlel 2:RESWK; I've simply moved the top of the graph down. You may also want to adjust the sides to keep the height/width in the same proportions if your graph is sensitive to distortion. The amount for the adjustment will depend on the size of the title. The most common mistake in this example is to create a smail box for the title instead of keeping it full-size. Even though you only see one title line, SAS sees one line with text and blank space below it The blank space has to fit into the template panel as well. Multiole graphs on a page The next part of the paper will show how to put several graphs on the same page with one title. It is similar to the situation where you didn't save room for the title. I created a graph for each of four groups in my data instead of one line for each group. Notice I only specified one name. SAS will name the graphs RESWKA, RESWKAI, RESWKA2, and RESWKA3 so each graph-has a unique name. If you had specified an 8-character name, SAS would have replaced the last character with the number. If you have more than nine graphs, it replaces the last two characters. 1042

PROC GPLOT DATA=ONE GOUT=GRAPHS.STUDYA; BY GROUP; PLOT * / NAME='RESWKA'i The GREPLA Y to put all four graphs on the same page follows. PROC GREPLAY GOUT=TEMP TC=TEMP NOFS; TDEF BOX4 DES='4 BOXES WITH TITLE SPACE' 1 / LLX=O LLY=SO ULX=O ULY=90 URX=SO URY=90 LRX=SO LRY=SO 2 / LLX=SO LLY=SO ULX=SO URX=lOO ULY=90 URY=90 LRX=100 LRY=SO 3 / LLX=O LLY=O ULX=O ULY=40 URX=SO URY=40 LRX=SO LRY=O 4 / LLX=SO LLY=O ULx=50 ULY=40 URX=lOO URY=40 LRX=lOO LRY=O 5 / LLX=O LLY=O ULX=O ULY=lO.O URX=100 URX=100 LRX=100 LRY=O; TEMPLATE BOX4; TREPLAY l:reswk 2:RESWKl 3:RESWK2 4:RESWK3 S:TITLEl; RUN; Notice that the overall title panel doesn't have to be Panel 1. When you do several graphs on one page, make sure you leave enough white space between each graph. Sometimes your graphs will have plenty of white space and other times you'll need to put the space between the panels. r ve also moved the TC to an option on the PROC rather than a separate statement. I included a description for the template, too. I also added the option NOFS which indicates you are not using a full-screen. In a batch job you don't have full screen capabilities anyway so it doesn't matter. Use this option if you are running an interactive job and just want to display the grapb without seeing the replay screens. Previewing templates Sometimes the coordinates aren't easy to figure out What if you needed 3 graphs with two on top and the third ceutered on the bottom? Expetimenting with coordinates is much easier in interactive SAS. In interactive SAS, submit PROC GREPLAY; You don't even need a RUN statement. If you just want to experiment with templates, you can leave most of the fields blank. Fill in the TC field. (One-level name for temporary templates to be in WORK.GSEG and two-level name to store them in a catalog. Make sure you have already referenced the catalog with a LIBNAME statement) Enter TC on the command line. You are now on a screen with a list of templates in you catalog. If this is your first use of the catalog, you won't have any names. On the command line, enter EDIT tempname where tempname is the template you want to create. You now get a screen to enter the coordinates for each panel. There are also several other options you can enter. These options can also be used in a batch job. After you enter the panel numbers and coordinates, enter PREVIEW on the command line to see your results. If you like the results, use the END key to return to the previous screen. Use END again to return to the list of templates and save you results. (If you don't get a message that the results were saved, you should go back to the coordinate screen and type the command SA VB.) You should now bave a template listed. If you didn't like the results, just change the coordinates and PREVIEW the changes until you like your results. Specify a color when you want a box to appear around the panel wben you use the template. To see a graph in the template, return to the first screen. This time you will need to indicate where your graphs are stored by completing the IGOUT field. You'll also need to specify the TC field for the template catalog and the 1EMPLA 1E field for the name of the template. In the SEL field for each graph, put the panel number. If two graphs have the same number, they will overlay each other. PROC GREPLAY also has many other uses. I created the example graphs and stored them in a catalog for future reference. I used PROC GREPLA Y to send them to a graphics stream file which I then downloaded to my PC. I was then able to import them into my word- 1043

processor and add comments so the graphs and text would be in one document We are just starting this process at my current site so you can see I need to change some options to have a better-looking graph. The original SAS graph was in color but I needed to use a black -andwhite printer. Data Step Graphics Interface You can accomplish the same results by using the Data Step Graphics Interface instead of PROC GREPLAY.. For more information on how to use DSGI, please contact the author. Conclusion PROC GREPLAY can be a useful tool to rednce processing time in making minor chauges. Note: These graphs were created in color and down-loaded to a word-processor to be printed in black-and-white. The actual graphs are mucb clearer. SAS and the other products are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. Contact: (Home) Deb Cassidy 3809 Secretariat Conrt Columbus, OH 43221 (614)771-7861 (answering machine) (Work) Computer Horizons Corp. 1980 E. 116th Street, Suite 317 Carmel. IN 46032 (317) 574-5600 1044

hh h hmh -:~::-~::::--~~:--~=:~'::::::::---:::::::-:::::::::=:::::g-:::::::::::-::::::::::::::::: --- ~:" r--------------------------------------------------------~~~;~;--~-~~~-~~;---------------------------------------------------------------- I i 16 ~ ~-------------! ::t~------:-::.::-:-:---:-~- _.<-:::=--=---- -h _h_ - h! 10... _..... _........_~,..---,.--... --.---.-- :,:... -... -... ~ -... E.. n_ --- - -- -- ----- --: --."<! 8~ ----------.1-----------_,-------------r_----------,1,!, l!!! GROUP 2 3 APPENDIX 1.7 4 5 Step L Top box shows graph without title_ Bottom box shows title only_ APPENDiX 1_7 LY S -- 16 --------------------------"1< 14 --~-.-- -B :~ ---== m ::;; "'...-...-..._... 8'r------------~,------------r-----------_,-------------T'1 2 3 4 5 Step 2_ This is the finished graph with the title overlaid on the graph_ You won't have a box around the graph unless you specify a color for the panel. 1045

RESUlT 16 15 14 13 " GROUP=A APPENDIX 1.7 _--''' 14 ~------- 13 12>-.-.-.- ~ 2 3 4 5 GROUP=B 9>-------.------.-------.------, 2 3 4 5 12 11 10 / GROUP=<; /~--~ 13 _./ 11 8 10 12 GROUP=D 2 3 4 5 2 3 4 ~ 5 Multiple graphs per page. The graph for each group is created as a separate graph. All four graphs and the title and then combined and printer with PROC GREPLA Y. 1046