What to Consider When Choosing an Output Format

Considerations

When choosing a format for your SAS/GRAPH output to use with Microsoft products, you must consider the following:
  • whether you need output in a graphics format or a document format
  • the resolution and size of your graphs
  • the color depth required for your graphs
  • the fonts that you want to use
  • whether you need multiple graphs per page
  • whether you need to edit your graphs using Microsoft products or using other third-party software

Graphics Formats Versus Document Formats

The SAS/GRAPH software supports output in both graphics format and document format. The graphics format includes graphics information and some text, such as titles, footnotes, and legends. The graphics format includes:
EMF CGM JPEG GIF
WMF PNG TIFF BMP
The document format can include both text and graphics in a single document. These documents store graphics in one of the following ways:
  • in the format of the document
  • in a graphics format embedded in the document
  • in an external file that the document links to
To include images in a document, the images must be compatible with the document. Here is a summary of the compatibility between the SAS/GRAPH document and graphics formats:
Document Format and Graphics Format Compatibility
Document Format
Compatible Graphics Formats
HTML
PNG, GIF, JPEG, SVG, and ActiveX
RTF
EMF, PNG, JPEG, and ActiveX

Image Resolution and Size

Each of the SAS/GRAPH graphics output devices has a default size and resolution setting for the graphics that they generate. For information about the default settings for each device, see Overview: Using Graphics Devices. If you are using a raster format for your graphs, resizing the graph after it is imported into a Microsoft application might degrade the quality of the graph. To preserve the qualify of your raster image, when you create your graph in SAS, set the size to the size that you need in the Microsoft application so that it does not have to be resized after it is imported. See Setting the Size of Your Graph. You can also change to one of the vector formats, which can be resized with no loss of quality.
If you need a high-resolution image, many of the graphics output devices enable you to use the graphics options to change their default resolution. Some of the devices have device variants that you can use to generate high-resolution images. See Setting the Resolution of Your Graph.

Color Depth

Another consideration when choosing a graphics format is color depth, which is the number of bits that are used to represent each color in an image. Color depth can affect the smoothness, clarity, and color trueness of the elements in a rasterized image. A greater color depth means that more distinct colors are available to represent elements such as gradient shading and antialiasing in text.
Most of the graphics file formats support Truecolor, which provides a 24-bit color depth. The GIF format provides only an 8-bit color depth, which can represent up to 256 distinct colors in a single image. For many graphics, 8-bit color depth is sufficient. However, if your output includes background images, color gradients, or other color-intensive elements, consider using a format that supports Truecolor. The formats that support Truecolor include the following:
BMP EPS WMF
CGM PNG
EMF SVG
See Overview: Using Graphics Devices for information about the color depth supported by each of the graphics output devices.

Fonts

Microsoft Office products use fonts that are native to the Windows operating system, which include TrueType and OpenType fonts. The SAS/GRAPH graphics output devices might support the fonts that you are using in your Microsoft applications. See Using SAS/GRAPH Fonts for information about the fonts that the SAS/GRAPH graphics output devices use.

Multiple-Image Graphics Files

If you need to store more than one graph in a file, you can use one of the following methods:
  • Use the GREPLAY procedure to replay multiple graphs to a file of the same format that was used to generate the original graphs.
  • Use the ODS DOCUMENT destination and the DOCUMENT procedure to replay multiple graphs to a file of any supported format
  • Use the ODS PRINTER destination with a Universal Printer device that supports multiple-page documents.
  • Use the GIFANIM procedure to insert multiple graphs into an animated GIF.
See Using the GREPLAY Procedure to Store Multiple Graphs in One Graphics Output File and Exporting Your Output for information about replaying your graphs. See Developing Web Presentations with the GIFANIM Device for information about using the GIFANIM device.

Ability to Edit: Vector Versus Raster Formats

If you need the ability to edit your graphs using Microsoft or other third-party software, choose a graphics format that enables you to perform the type of editing that you need to do. For vector formats, such as WMF, EMF, SVG, and CGM, you can edit individual text and graphics elements using graphics editing software. Although EPS contains vector graphs, Microsoft products cannot edit an EPS image. For raster images, some programs such as Microsoft Paint enable you to edit the image. However, in Microsoft Office products, editing is limited to changing only the global attributes of the image, such the size, contrast, brightness, and so on.