About Exporting SASGRAPH Output


About Exporting SAS/GRAPH Output

By default, SAS/GRAPH output is stored in SAS catalogs as catalog entries of type GRSEG. These entries can be viewed and manipulated within the SAS System and, in some operating environments, can be printed directly as hardcopy. However, you may want to use your SAS/GRAPH output outside of the SAS System. For example, you may want to

  • import your graphs into other software packages

  • use host system commands or applications to print or manage your graphs

  • run batch processes to create and print multiple copies of your graphs

  • create graphics output and HTML files that enable you to display SAS/GRAPH output on the Web.

In order to do these kinds of things with your SAS/GRAPH output, you must export your graphs from SAS/GRAPH, using a different graphics file format, such as CGM, GIF, or TIFF, and store them in external files.

For information on creating SAS/GRAPH output for Web publishing, see Chapter 9, Introducing SAS/GRAPH Output for the Web, on page 369. For information on SAS/GRAPH language elements and programs and on how procedure output is generated, see Chapter 2, SAS/GRAPH Programs, on page 25. For information on using and managing SAS/GRAPH output, see Chapter 4, SAS/GRAPH Output, on page 47.

About Graphics Stream Files

When you export SAS/GRAPH output, you run the output through a device driver that creates a graphics stream file or GSF. A GSF is an external file that contains graphics commands. Typically, you select a device driver that produces the type of graphics file format that you want, such as CGM, PS or EPS, GIF, or TIFF, although you can select a driver that sends the output directly to a printer or other hardcopy device without creating an external file. You can specify the exact name and location of each file or assign a default location to which all files are sent.

Note: You can also use the Output Delivery System (ODS) or SAS/GRAPH device drivers to generate SAS/GRAPH output as HTML and GIF files that you can view with a Web browser. Details are discussed in Chapter 9, Introducing SAS/GRAPH Output for the Web, on page 369.

Once you have created a GSF, you can

  • print the file using host commands

  • view the file with an appropriate viewer or browser

  • edit the file with the appropriate editing software

  • import the file into other software packages.

Note: A GSF is different from a SAS/GRAPH catalog entry. A GSF is an external file that is independent of SAS, and a catalog entry is a type of SAS file. Consequently, you use host commands to manipulate a GSF independent of the SAS System, whereas you must use the SAS System to manipulate SAS catalog entries. For example, to view graphics output stored in a catalog you must use the GREPLAY procedure or the GRAPH window.

About Graphics File Formats

You can export your SAS/GRAPH output in many different graphics file formats. These are some of the most common formats that SAS/GRAPH software supports:

BMP

Windows bitmap

CGM

Computer graphics metafile

EPS

Adobe s encapsulated PostScript language

GIF

GIF format

HP-GL

Hewlett Packard s Graphics Language (plotter control language)

JPEG

JPEG format

PBM

Portable bitmap

PDF

Portable Document Format

PNG

Portable Network Graphics format

PS

Adobe s PostScript language

PPM

Portable pixmap

TIFF

Tagged Image Format File

The type of graphics file format that you choose depends on how you are going to use the output. If you are planning to import the graph into other software products, such as Microsoft Excel or Word Perfect, you may prefer to create a CGM file. These vector-based files are usually smaller than bitmapped files, and they can be edited. In addition, they use hardware fonts and provide a clear image on high-resolution devices.

If you want to display the graph on a Web page, or import it into software that cannot accept vector graphics like CGM, you will need to create a bitmapped file using a format such as GIF or TIFF.

Note: The HTML and WEBFRAME drivers generate both HTML files and GIF files specifically for use with a Web browser. For details, see Chapter 9, Introducing SAS/ GRAPH Output for the Web, on page 369.

Most software packages that process graphics input can accept one or more of these file formats. Check the documentation for the hardware or software product to which you want to send the graph to determine what file format or formats it can use.

For a complete list of graphics file formats available with SAS/GRAPH in your operating environment, refer to the Device Help for SAS/GRAPH in the SAS Help facility.

Ways to Export SAS/GRAPH Output

There are several ways to send SAS/GRAPH output to an external file in a different graphics file format. You can export graphics output in these ways:

  • From the GRAPH window or the Graphics Editor window, use menu selections to select the type of file format and specify a destination for the output that is displayed in the window. When you export SAS/GRAPH output in this way, you are limited to the types of file formats that the Export as Image window supports in your operating environment. For details see Exporting SAS/GRAPH Output Interactively on page 62.

    Operating Environment Information: In Windows operating environments, WMF formats cannot be exported using this method.

  • Use SAS/GRAPH program statements to direct the output to a graphics stream file. When you use program statements to create a GSF, you explicitly specify a SAS/GRAPH device driver. This driver can be one of the drivers supplied with SAS/GRAPH software and stored in SASHELP.DEVICES, or a custom driver that you have created. For details see Exporting SAS/GRAPH Output with Program Statements on page 62.

  • Create a custom device driver that contains all of the commands for producing a GSF. For details see Exporting SAS/GRAPH Output Using Modified Device Entries on page 72.

  • Use the SAS/GRAPH web drivers or the Output Delivery System to create HTML and GIF files. For details see Chapter 9, Introducing SAS/GRAPH Output for the Web, on page 369.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net