SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Plots
Viewing and Storing Plots


Specifying a Storage Location for Your Graphs

By default, the plots or other graphs that you create using SAS/GRAPH software are stored as entries in a temporary SAS catalog named Work.Gseg. When you create a graph, it is appended to the catalog. Each stored graph is known as a catalog entry and has the type GRSEG. You can access a stored graph by its four-level name:

libref.catalog.name.grseg

To save graphs in a SAS catalog other than the default catalog, you use the GOUT= option in the PROC statement for the step that creates your graph. So, when you create plots, you specify GOUT= in the PROC GPLOT statement.


General form, GOUT= option:

     GOUT=<libref.>output-catalog

where

  • libref is the name of the SAS library where the catalog is (or will be) stored.

  • output-catalog is the name of a catalog that either exists or is created when the procedure runs. If the catalog specified in the GOUT= option already exists, the procedure simply adds a catalog entry to the catalog.
Note: If you omit the libref in the GOUT= option, SAS/GRAPH software looks for the catalog in the temporary library called Work and creates the catalog if it does not exist.


Examples

The following program creates a plot in the temporary catalog Work.Newcat.

     symbol1 interpol=spline value=none color=red;
     symbol2 interpol=spline value=none color=blue;
     proc gplot data=clinic.therapy1999 gout=newcat;
        plot swim*month aerclass*month / overlay;
        where swim>35 and aerclass>35;
     run;

This program creates a plot in the permanent catalog Mylib.Permcat in the Windows environment.

     libname mylib 'd:\reports\permfiles';
     symbol1 interpol=spline value=none color=red;
     symbol2 interpol=spline value=none color=blue;
     proc gplot data=clinic.therapy1999
          gout=mylib.permcat;
        plot swim*month aerclass*month/overlay;
        where swim>35 and aerclass>35;
     run;

back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement