Chapter 24: Using Annotate Data Sets


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, GRADAR, 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

  • label points on a map using map coordinates

  • label bars on horizontal and vertical bar charts

  • label points on a plot

  • create a legend for a three-dimensional graph.

Figure 24.1 on page 588 shows GMAP procedure output annotated with stars and labels at selected cities.

click to expand
Figure 24.1: Annotate Graphics Applied to a Map

The program that creates this output is in Labeling Cities on a Map on page 604.

Creating Custom Graphs

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

  • create various types of graphs (including pie charts, bar charts, and plots)

  • draw graphics elements such as lines, polygons, arcs, symbols, and text.

Figure 24.2 on page 589 is an example of a custom graph that uses Annotate commands to draw the graphic elements.

click to expand
Figure 24.2: Custom Graphics Using Only Annotate Commands

The program that creates this output is in Drawing a Circle of Stars on page 609.

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 on page 589. 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 on page 595.)

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

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




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