|The GREPLAY Procedure|
|Using the GREPLAY Windows|
You can use the GREPLAY windows instead of code-based statements to replay and manage catalog entries. You perform tasks that use the GREPLAY procedure windows by entering values in the fields that are displayed in the windows and by issuing commands from the command line.
There are five GREPLAY windows:
GREPLAY Procedure Windows shows how these windows relate to each other. Each window can be scrolled forward or backward as needed to display additional fields and information.
GREPLAY Procedure Windows
section briefly describes the GREPLAY windows;
for a complete description of each window and its fields, refer to the SAS
You can navigate and manipulate the
GREPLAY windows by entering
commands on the command line or by selecting them from the menus. For a complete
description of all the GREPLAY window commands, refer to the SAS Help facility.
This window is the first to appear when you submit the PROC GREPLAY statement on a full-screen device without the PRESENTATION or NOFS option. You can use it to both replay graphics output and to manage catalog entries that contain graphics output.
The PROC GREPLAY Window
This window is a modified version of the PROC GREPLAY window that enables
you to replay graphics output while it prevents you from deleting entries
or changing templates and color maps. Once you have created and organized
your catalog, you may want to use the PRESENTATION window in an application
for replaying graphics output.
This window lists the names of the catalog entries, gives a brief description of each, and indicates the date on which each entry was created or last changed. Although all catalog entry types are displayed in the DIRECTORY window, you can manage only entries of type CMAP or TEMPLATE from this window.
The DIRECTORY Window
This window lets you design templates that you can use to present graphics output. You design a template by specifying the coordinates of its panels and determining the order in which the template panels are filled. Once you enter coordinates for a panel, you can alter them easily by using the Scale, Xlate (translate), and Rotate utility fields. These utility fields recalculate coordinate values automatically.
The TEMPLATE DESIGN Window
This window allows you to map colors in existing graphics output to new colors when you replay the graphics output. When you replay graphics output that is contained in a catalog entry and assign a current color map, any color in the graphics output that appears in the From column of the color map is mapped to the corresponding color in the To column of the color map. Using a color map does not change the contents of the replayed graphics output and does not produce new graphics output unless a template is also used.
The COLOR MAPPING Window
|If you are in the...||and you want to open the...||then...|
|PROC GREPLAY statement||PROC GREPLAY window||Submit the PROC GREPLAY statement without using the PRESENTATION or NOFS options.|
|PRESENTATION window||Submit the PROC GREPLAY statement and include the PRESENTATION and IGOUT= options.|
|PROC GREPLAY window||PRESENTATION window||Specify a catalog and issue the PRES command.|
|DIRECTORY window||Specify a template catalog and issue the TC command.
Specify a color map catalog and issue the CC command.
|TEMPLATE DESIGN window||Specify a template catalog and issue the following command: edit template-name.template|
|COLOR MAPPING window||Specify a color map catalog and issue the following command: edit color-map-name.cmap|
|DIRECTORY window||TEMPLATE DESIGN window||Place an S beside the name of an existing template.
Issue the following command:
|COLOR MAPPING window||Place an S beside the name of an existing color map.
Issue the following command:
|Managing Catalog Entries|
You can replay entries or perform a variety of catalog management tasks with GREPLAY code-based statements. Ways of Performing Common GREPLAY Procedure Tasks lists several common tasks and the statements that you use to perform them.
|copy graphics output (GRSEGs) from the input catalog to the output catalog*||COPY statement|
|arrange GRSEG entries into logical groupings||GROUP statement|
|reorder the entries||MOVE statement|
|delete unneeded GRSEG entries||DELETE statement|
|change entry names and descriptions of entries in the input catalog||MODIFY statement|
|replay an entry from the input catalog||REPLAY statement|
|replay an entry in a template panel||TREPLAY statement|
|*You must assign an output catalog before copying graphics output.|
|Replaying Catalog Entries|
To select catalog entries for replay, first assign an input catalog that contains the graphics output that is to be replayed. Then assign the entry with the REPLAY statement.
For example, the following statements replay the GRSEG entry named GRAPH1 from the catalog MYLIB.GRAPHS, which is assigned with the IGOUT= option:
libname mylib 'SAS-data-library'; proc greplay igout=mylib.graphs nofs; replay graph1; run; quit;
If you do not specify an output catalog with the GOUT= option in the PROC statement of the SAS/GRAPH procedure that creates the graphics output, the graphics output is automatically stored in the WORK.GSEG catalog. Replay the graphics output that is stored in this catalog as follows:
proc greplay nofs; igout work.gseg; replay _all_; run; quit;
|Creating Templates and Color Maps|
You can use the GREPLAY procedure to create templates and color maps. You can use templates to replay graphics output from several catalog entries on a single display, or to change the shape or size of graphics output. You can use color maps to remap colors when replaying graphics output.
A color map is a list of up to 256 pairs of colors that enables you to change the colors in graphics output by mapping the original colors to a list of new colors. Color maps are useful for controlling how colors that are not available on the current device are remapped.
When you assign a current color map and replay graphics output that is stored in a catalog entry, any color in your graphics output that appears in the From column of the color map is mapped to the corresponding color in the To column of the color map. The new colors are not saved with the graphics output, and you do not create new graphics output when you use a color map to replay graphics output.
|Task||In line mode|
|assign a color map catalog||CC statement|
|copy a color map from another catalog||CCOPY statement|
|define or modify a color map in the current catalog||CDEF statement|
|assign a color map to use when you replay graphics output||CMAP statement|
|delete unneeded entries||DELETE statement|
|assign a template catalog||TC statement|
|copy a template from another catalog||TCOPY statement|
|delete a template||TDELETE statement|
|define a template||TDEF statement|
|display the panel outlines for a template||PREVIEW statement|
|assign a template to use when you replay graphics output||TEMPLATE statement|
|replay an entry in a template panel||TREPLAY statement|
Before you create a template, you must assign a template catalog. If you are use the GREPLAY procedure in line mode, use the TDEF statement to define a template and the PREVIEW statement to preview a template. For example, the following statements define and preview a template named TEMPLT:
tdef templt 1/def; preview templt;
Before you create a color map, you must assign a color map catalog. If you use the GREPLAY procedure in line mode, use the CDEF statement to define a color map. For example, the following statement defines a color map named CLRMAP:
cdef clrmap 1 / cyan : blue;
|Replaying Graphics Output in a Template|
You can use the GREPLAY procedure to create new graphics output by replaying existing graphics output in templates. You can use the templates that are provided with SAS/GRAPH software and stored in the catalog SASHELP.TEMPLT, or you can create your own templates. Before you can replay graphics output in a template, you must assign a template catalog and a current template, as well as an input catalog. Then assign the entries to the template with the TREPLAY statement.
For example, the following statements replay the entries GRAPH1 and GRAPH2 into the V2 template, which is stored in the catalog SASHELP.TEMPLT. The TC statement specifies the catalog that contains the template, and the TEMPLATE statement specifies the template. The TREPLAY statement assigns each entry to a panel. (The V2 template has two panels, so there is an assignment for panel 1 and panel 2.)
proc greplay igout=mylib.graphs nofs; tc sashelp.templt; template v2; treplay 1:graph1 2:graph2; run;
When you replay graphics output in a template, the new graphics output that is created by the GREPLAY procedure is automatically provided a default name and is stored in the output catalog, WORK.GSEG.
Templates are often used to describe positioning for replaying graphics output from several catalog entries on a single display.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.