Book Contents
Book Contents
Previous
Previous
Next
Next
SAS/STAT User's Guide

Using the %PLOTIT Macro

You can use the PLOT procedure to create low-resolution printer plots of labeled points. Alternatively, you can use the %PLOTIT macro to create high-resolution graphical scatter plots of labeled points.

The %PLOTIT macro is designed to make it easy to display raw data, regression results, and results from the CORRESP, MDS, PRINCOMP, PRINQUAL, and TRANSREG procedures. It can position labels, draw curves, vectors, and circles, and shade to show density or a third variable. You can control the colors, sizes, fonts, and general appearance of the plots. You can also use the %PLOTIT macro to create contour plots for discriminant analysis.

The %PLOTIT macro is a part of the SAS Autocall library. If your site has installed the autocall libraries supplied by SAS Institute and uses the standard configuration of SAS software supplied by the Institute, you need only to ensure that the SAS system option MAUTOSOURCE is in effect to begin using the autocall macros.

For more information about autocall libraries, refer to SAS Macro Language: Reference, First Edition, 1997. The macro is documented in the comments section at the top of the macro, and it is described in the 1994 Observations article "Graphical Scatter Plots of Labeled Points," Fourth Quarter, pp. 23 -37. The %PLOTIT macro and documentation can also be found at SAS Institute's web site (http://www.sas.com).

%PLOTIT Macro Options Used in this Book

Most of the examples in this book that invoke the %PLOTIT macro are created with a specific set of options. The graphics are generated by using a special macro variable called plotitop.

The code you see in the examples creates the color graphics that appear in the online (CD) version of the manual. A slightly different set of options and statements are used to create the black and white graphics that appear in the printed version of the book.

To create the online (color) version of the graphic output, the plotitop variable is defined as follows:

   %let plotitop =  gopts   = gsfmode = replace
                    gaccess = gsasfile device = gif
                    hsize   = 5.63     vsize  = 3.5 
                    cback   = white,
                    cframe = ligr,
                    color   = black,   
                    colors  = red blue white,
                    options = noclip expand, post=myplot.gif;

To create the black and white version of the graphic output, which appears in the printed version of the manual, the plotitop variable is defined as follows:

   %let plotitop =  gopts   = gsfmode = replace
                    gaccess = gsasfile device = pslepsf
                    hsize   = 5.63     vsize  = 3.5 
                    cback   = white,    
                    color   = black, 
                    colors  = black, 
                    options = noclip border expand, post=myplot.ps;

For information on graphics options used in other examples, see Chapter 2, "Introduction."

Book Contents
Book Contents
Previous
Previous
Next
Next
Top
Top