GREPLAY Procedure

Example 5: Creating a Color Map

Features:
GREPLAY statement options::
CC=
GOUT=

CDEF statement

CMAP statement

LIST statement

Sample library member: GRECRCM1
This example uses the CDEF statement to define a color map. The LIST statement is used in this example to display the color map definition in the SAS log. Defining a Color Map (GRECRCM1) shows a partial SAS log listing.
Defining a Color Map (GRECRCM1)
 .
 .
 75        /* list  color map contents */
 76     list cmap;

  MYCOLOR       Special Color Map

        FROM        TO

   1    PINK        RED
   2    CYAN        BLUE
   3    LIG         GREEN

 77  quit;
 .

Program

goptions reset=all border;
proc greplay cc=clrmap gout=excat nofs;
  cdef mycolor des="Special Color Map"
        1 / pink  : red
        2 / cyan  : blue
        3 / lig     : green;
   cmap mycolor;
      list cmap;
   quit;

Program Description

Here is a detailed example of the example program.
Set the graphics environment.
goptions reset=all border;
Start the GREPLAY procedure. The CC= option assigns CLRMAP as the color map catalog. The GOUT= option assigns EXCAT as the graphics output catalog. Both options must be assigned for the color map to be created.
proc greplay cc=clrmap gout=excat nofs;
Define a color map. The CDEF statement defines a color map named MYCOLOR that contains three color pairs.
  cdef mycolor des="Special Color Map"
        1 / pink  : red
        2 / cyan  : blue
        3 / lig     : green;
Specify a current color map, and write contents to the SAS log. The CMAP statement assigns MYCOLOR as the current color map. The contents of CMAP are listed in the SAS log.
   cmap mycolor;
      list cmap;
   quit;