Graphics Segments

A graph is saved in what is called a graphics segment. A graphics segment is simply a collection of primitives and their associated attributes that creates a graph.

Each time you create a new segment, it is named and stored in a SAS graphics catalog called WORK.GSEG. If you want to store your graphics segments in a permanent SAS catalog, do this with options to the GSTART call. You can name the segments yourself in the GOPEN statement, or you can let the IML procedure automatically generate a segment name. In this way, graphics segments that are used several times can be included in subsequent graphs by using the GINCLUDE command with the segment name. You can also manage and replay a segment by using the GREPLAY procedure as well as replay it in another IML session by using the GSHOW command.

To name a segment, include the name as an argument to the GOPEN statement. For example, to begin a new segment and name it STOCK1, use the following statement:

   call gopen("stock1");

For more information about SAS catalogs and graphics, refer to the chapter on graphics in SAS/GRAPH Software: Reference.