Chapter Contents

Previous

Next
SAS/GRAPH Software: Reference

Overview

The Annotate facility enables you to generate a special data set of graphics commands from which you can produce graphics output. This data set is referred to as an Annotate data set. You can use it to generate custom graphics or to enhance graphics output from many SAS/GRAPH procedures, including GCHART, GCONTOUR, GMAP, GPLOT, GPRINT, GSLIDE, and G3D.


Enhancing Existing Graphs

The Annotate facility enhances output from SAS/GRAPH procedures by adding graphics elements to the output. For example, you can

Annotate Graphics Applied to a Map from the GMAP Procedure (GR10N01) shows GMAP procedure output annotated with stars and labels at selected cities.

Annotate Graphics Applied to a Map from the GMAP Procedure (GR10N01)

[IMAGE]

The program that creates this output is in Example 1: Labeling Cities on a Map.


Creating Custom Graphs

You can also use an Annotate data set to create custom graphics. For example, you can use Annotate graphics commands to

Custom Graphics Using Only Annotate Commands (GR10N03) is an example of a custom graph that uses Annotate commands to draw the graphic elements.

Custom Graphics Using Only Annotate Commands (GR10N03)

[IMAGE]

The program that creates this output is in Example 3: Drawing a Circle of Stars.

Note:   The Annotate facility provides many of the same features as the DATA Step Graphics Interface (DSGI). Use the following guidelines to help you decide whether to use DSGI or the Annotate facility when creating custom graphs or enhancing SAS/GRAPH output:  [cautionend]

For more information on DSGI, see Data Step Graphics User's Guide.


Creating Annotate Graphics

In order to create and use Annotate graphics, you must first understand the structure and functioning of the Annotate data set. For this information see About the Annotate Data Set. Once you understand the way the data set works, you can follow these three steps to create Annotate graphics:

  1. Determine what you want to draw, and where (location) and how (coordinate system) you want to position it on the graphics output. (See About Annotate Graphics.)

  2. Build an Annotate data set of graphics commands using the Annotate variables and functions. (See Creating an Annotate Data Set.)

  3. Submit a SAS/GRAPH procedure to produce the graphics output. (See Producing Graphics Output from Annotate Data Sets.)


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.