Presentation Quality Graphics with SAS/GRAPH

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

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

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

The GIMPORT Procedure

The GANNO Procedure. Overview CHAPTER 12

Displaying Multiple Graphs to Quickly Assess Patient Data Trends

INTRODUCTION TO THE SAS ANNOTATE FACILITY

PharmaSUG 2015 Paper PO03

SAS/GRAPH : Using the Annotate Facility

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

ODS LAYOUT is Like an Onion

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

Chapter 1 Introduction. Chapter Contents

Multiple Forest Plots and the SAS System

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

Converting Annotate to ODS Graphics. Is It Possible?

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

Create Flowcharts Using Annotate Facility. Priya Saradha & Gurubaran Veeravel

The GSLIDE Procedure. Overview. About Text Slides CHAPTER 27

Creating Maps in SAS/GRAPH

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

PDF I N S T R U C T I O N GUIDE

A SAS Macro to Generate Caterpillar Plots. Guochen Song, i3 Statprobe, Cary, NC

Custom Map Displays Created with SAS/GRAPH Procedures and the Annotate Facility Debra Miller, National Park Service, Denver, CO

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

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

Customized Flowcharts Using SAS Annotation Abhinav Srivastva, PaxVax Inc., Redwood City, CA

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

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA

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

Innovative Graph for Comparing Central Tendencies and Spread at a Glance

* builds the RGB color string from the color. * reads the red, green; and blue values for. * constructs an ANNOTATE dataset by

Chapter 27 Saving and Printing Graphics

Chapter 3 Managing Results in Projects. Chapter Table of Contents

DOWNLOAD OR READ : WHATS THE DIFFERENCE IN PROTESTANT AND ROMAN CATHOLIC BELIEFS PDF EBOOK EPUB MOBI

Enhanced Financial Reporting. Overview

GENERATING SAS HARD COpy OUTPUT UNDER THE VMS N VAX ENVIRONMENT

Routing Output. Producing Output with SAS Software CHAPTER 6

THE IMPACT OF DATA VISUALIZATION IN A STUDY OF CHRONIC DISEASE

Information Visualization

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

Xerox Web Document Submission Software. Workflow Guide. Document version 1.0 January 2003 Part Number 701P39685

EXPORTING SAS OUTPUT ONTO THE WORLD WIDE WEB

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

Coders' Corner. Paper ABSTRACT GLOBAL STATEMENTS INTRODUCTION

Part 1. Introduction. Chapter 1 Why Use ODS? 3. Chapter 2 ODS Basics 13

BOXOFT Image to PDF s allow you scans paper documents and automatically s them as PDF attachments using your existing software

III-6Exporting Graphics (Windows)

FDA Portable Document Format (PDF) Specifications

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

Annotate Dictionary CHAPTER 11

User s Guide to Creating PDFs for the Sony Reader

Arthur L. Carpenter California Occidental Consultants

Changing Titles on Graphs With Minimal Processing

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

Overview 14 Table Definitions and Style Definitions 16 Output Objects and Output Destinations 18 ODS References and Resources 20

The GTESTIT Procedure

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

Quick Results with the Output Delivery System

SAS/GRAPH and ANNOTATE Facility More Than Just a Bunch of Labels and Lines

A Juxtaposition of Tables and Graphs Using SAS /GRAPH Procedures

Using ANNOTATE MACROS as Shortcuts

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

CHAPTER 1 Introduction to SAS/GRAPH Software

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

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

ABC Macro and Performance Chart with Benchmarks Annotation

Developing a Dashboard to Aid in Effective Project Management

Managing SAS Output. Printing CHAPTER 5

Relativity Designer Installation Guide

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

Help with PDF Files Is there a way someone else can do this for me? What Software Do I Need to Create PDF Files?

Introduction. Overview. Document Conventions

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

Using Personal Computers as Host Graphics Devices

Watch the video below to learn more about formatting cells in Excel. *Video removed from printing pages. To change the font size:

Preparing and Submitting Electronic Files for the 2016 IEEE International Electron Devices Meeting

ICH M8 Expert Working Group. Specification for Submission Formats for ectd v1.1

Preview tab. The Preview tab is the default tab displayed when the pdffactory dialog box first appears. From here, you can:

Preparing and Submitting Electronic Files for the IEEE International. Reliability Physics Symposium

Synapse InSite. Version 4.0. Customer Quick Start Guide English.

Internet, Intranets, and The Web

Run your reports through that last loop to standardize the presentation attributes

Océ User manual. Océ PRISMAprepare Printer settings

SmartCAM Advanced Fabrication

Adobe Acrobat 5.0. Overview. Internet & Technology Training Services Miami Dade County Public Schools

What you will learn 2. Converting to PDF Format 15 Converting to PS Format 16 Converting to HTML format 17 Saving and Updating documents 19

SAS/ASSIST Software Setup

Enterprise Guide Version 2.0 for Windows

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

TS-659: Exporting SAS/GRAPH Output to PDF Files from Release 8.2 and higher

SAS Drug Development Program Portability

How to prepare files for print

Modifying Graphics in SAS

Figure 1. Table shell

Impress Guide Chapter 10 Printing, ing, exporting, and saving slide shows

Template Tidbits. Q How do I get the places I can enter copy to show up? (Highlight Fields Bar)

Sunshine Pack & Ship Style Guide

Publishing Concurrent Requests with XML Publisher. An Oracle White Paper January 2005

This ReadMe contains information about installing Acrobat Reader 4.0 for Windows and Troubleshooting Issues.

Transcription:

Presentation Quality Graphics with SAS/GRAPH Keith Cranford, Marquee Associates, LLC Abstract The SASI GRAP~ Annotate Facilily along with hardware fonts can be used to produce presentation qualily graphics that compete with the commonly used Windows-based software packages. This paper will give some guidance in the use of these tools. A brief introduction to the Annotate Facility will be given, and the use oftrue Type fonts within the SAS System will be illustrated. Also, aspects of publishing these graphs in PDF and GIF formats will be discussed. Tools SAS/GRAP~ provides several tools for producing presentation qualily graphs. Among these are various options in each of the procedures, the Annotate Facilily, and hardware fonts (in particular, True Type fonts in the Windows environment). The latter two of these tools will be discussed in this section. The Annotate Facility in the SAs/GRAPH product can be used to enhance your graphics. This is accomplished through a data set of instructions to draw lines or figures at defined locations or write text to the SAS/GRAPH output. This data set consists of variables, which define these instructions. Among these variables are: FUNCTION: what to do (e.g., LABEL, DRAW, etc.) X: horizontal axis location Y: vertical axis location STYLE: slyleofline, or font for text SIZE: thickness of line, or font size for text XSYS: coordinate system for horizontal axis YSYS: coordinate system for vertical axis POSmON: relative positioning of text WHEN: when to draw For example, you may want to label the points on a line plot. To do this, you need to indicate what function you want to perform (FUNCTION = 'LABEL'), where you want to place the label (X = horizontal-axis variable value, Y = vertical-axis variable value, and POSmON = centered above the point), and what you want to label (TEXT = vertical-axis variable value). The following code would accomplish this. data anno set data ; length function $ 8 text $ 15 j retain xsys ysys '2' when 'a' ; function = 'label' ; x = x ; y = y ; text = put(y, best.) style = 'swissb' size = 2 ; position = '2' ; 55

proc gplot plot=data anno=anno plot y x These variables can be populated either through assignment statements (as in the above example), or using annotate macros that are available through SAS/GRAPH. The macros are accessible upon issuing the macro o/oannomac, which activates these macros. Some of the common macros listed below are more fully documented in the SAs/GRAPH User's Guide, Volume 1. %LABEL: draws text %MOVE: moves without drawing %DRA W: draws a line from the previous point %LINE: draws a line between to points %BAR: draws a bar %CIRCLE: draws a circle In the previous example, the assignment statements could be replaced by the %LABEL macro, with the appropriate parameters. liannollac ; data an no ; set data length function $ 8 text $ 15 ; retain xsys ysys '2' when 'a' ; %label(x,y,put(y,best.),black,o,o,2,swissb,2) run j By default, SAs/GRAPH can use a limited selection of fonts including SIMPLEX, DUPLEX or SWISS. However, in a Windows environment, a user can access system True Type fonts, such Times Roman or Arial, through the SAS/GRAPH font utility. This is documented in TS 300C, "Producing Hardcopy Graphics under Windows 95 & NT." In order to use these fonts you must install them through the font utility, which is done through the following steps: 1. Select the desired Windows printer driver from the Print Setup window. Note that there are four generic Windows device drivers: WINPRTM: for black and white (monochrome) printers WINPRTG: for gray-scale printers (postscript or laser) WINPRTC: for color printers WINPLOT: for plotters 2. Invoke the SAS/GRAPH Font Utility by selecting Help => Utility application > SAS/GRAPH Font Management Utility. 3. Select HARDCOPY for "Device type to install fonts for." 4. Specify the appropriate WINPRTx driver name in the DEVICE NAME field (the same one selected in Step 1 above). 5. Follow the remainiog instructions create a device catalog and a font catalog. Also, the CONFIG.SAS file can be updated to automatically assign the appropriate library references upon invocatioo of SAS. Once the foots have been registered in the SAS System, you will need to know how to reference them. To view the available fonts, submit the following program. 56

proc gdevice c=gdeviceo.devices nofs ; list WINPRT x j run j This produces a listing report specifying the chartype number, the font name, and whether the font is scalable. Keep this listing handy, since it is needed to specify the desired font. There are two ways to use these fonts. Specify CHARTYPE = n in the GOPTIONS statement, where n is the number that corresponds to the chartype of the font you want to use. This will apply to all text in the graph. Specify a font using the HWDMXnnn naming convention, where nnn is the number that corresponds to the chartype of the font you want to use. This provides maximum flexibility since any number of fonts or styles, such as bold or italics, can be used in a single graph. The label example above used the SWISSB, or Swiss Bold, font, which is available directly from SAS/GRAPH. However, if you want to use a Times Roman font instead, first find the corresponding chartype number from the listing described above. Then, use the hardware font name for the STYLE of the label. If Times Roman is chartype 20, the new program might look like this. data anno ; set data ; length function $ 8 text $ 15 ; retain xsys ysys '2' when 'a' j %label(x,y,put(y,best.),black,o,o,2,hwdmx020,2) run; Combining SAS/GRAPH capabilities with the Annotate Facility and True Type fonts, provides you with the tools that can produce high quality graphics. Some Helpful Suggestions The fonowing suggestions or guidelines can help make using the Annotate facility easier and more useful. Let SAs/GRAPH procedures do as much as possible Break the annotation into groups Use the ORIGIN= option to anchor the graph The first suggestion is a time saver. The SAs/GRAPH procedures provide a lot of flexibility and features, which should be taken advantage of. Before adding any annotation the basic gnlph should first be refined. In most cases, this is enough and no annotation is needed; however, when enhancements are needed the amount of annotation is kept to a minimum. This leads to the second suggestion. It is best to work in pieces by defining groups of annotation, such as a table, title or labeling, and then add one annotation at time. Doing this will allow you to concentrate development in one area and will also help in debugging. A helpful hint is using the ORIGIN= option on the AXIS statement. This allows you to anchor your graph, which helps in placing annotation outside the graph, such as tables. Publishing Your Graphs There are many ways to publish your SAS/GRAPH output, including simply printing the graphs for copying and distribution. However, it may be more convenient to publish and distribute the graphs in 57

some electronic means. Two ways of electronic publishing are shown in this section. The first is creating a GIF file from SAS/GRAPH output. This is useful when the graph is used in a document or included in an HTML document or Web page. The second is a PDF file, which can also be linked to a Web page, but provides the person viewing the graph more flexibility in both viewing and printing the file. SAS Institute provides drivers for GIF file formats, which make it easy to create the files using PROC GREPLA Y. You do this by setting the DEVICE= graphics option to GIF and specifying a filename to send the resulting graphics file. The fonowing example illustrates using PROC GREPLAY to create a GIF file from an existing SAs/GRAPH graph catalog entry. goptions device = gif gaccess=gsasfile; filename gsasfile 'graph1.gif' ; proc greplay igout = library.graphs nofs replay graph1 quit ; An Adobe PDF (portable Document Format) file is another convenient way to distribute your graphs electronically. To create this file you will need Adobe Distiller V3.01, a part of the Adobe Acrobat suite of tools. For someone to view this file, however, only Adobe Acrobat Reader (a free program which can be downloaded from www.adobe.com). is needed. Producing a PDF file directly from the SAS S~m is documented in TS-570, "Printing from the SAS System under Windows, Windows 95, and Windows NT." Ofparticular interest here is Section F, "Problems using Adobe PDF drivers interactively." The content of this section is described here. This process requires a setup step in Adobe Distiller before running your SAS program. However, once this is done the rest is automatic. The process is as fonows. 1. In Adobe Distiller select Distiller > Watched Folders 2. In the Watched Folders select a directory (must already exist) such as: c:\temp 3. In the "Check Watched Folders" box you can set how often you want Distiller to check for output 4. In the SAS System, use the Adobe Distiner Assistant driver (which will automatically be available after you install Adobe Acrobat) and direct output to the "watched" subdirectory adding an IN subdirectory to the name. For example, options sysprint = 'c:\temp\in\graph.pm' 'Distiller Assistant V3.01' ; 5. Once the.prn file is created Adobe Distiller automatically converts the file to the.pdf file. It then copies both files to the OUT subdirectory under the target. In the above example, two files will be created with the names graph.pm and graph.pdf. An example of the full SAS code needed to create a PDF file is given below. In this example, the graph entry is named 'GRAPHI' and found in the GRAPHS catalog in the LIBRARY library. opt1ons sysprint = 'c:\tenp\in\graph1.prn' 'Distiller AsSistant V3.01' goptions device=winprtc rotate=portrait proc greplay igout=library.graphs nofs; replay graph1 runj quitj For consistency, the name of the PDF file should be the same as the graph entry name. This can be done easily by making ~ into macro variables. 58

Conclusion SAS/Graph is a powerful and flexible tool for producing and distributing presentation quality graphs. This can be accomplished by taking better advantage of the tools provided in SAS/GRAPH such as the Annotate Facility and hardware fonts, and using the publishing tools, such as GIF and PDF files for distributing the graphs. SAS and SAS/GRAPH are registered trademarks or trademarks of SAS Institute, Inc. in the USA and other countries. Indicates USA registrations. Other brand and product names are registered trademarks or trademarks of their respective companies. Keith Cranford Marquee Associates, LLC 3810 Medical Pkwy, Suite 153 Austin, TX 78756 Phone: 512/453-6140 Fax: 5121453-6120 kcranford@aol.com 59