Creating Editable Graphics

You must create editable graph output before you can use the ODS Graphics Editor to edit the graph output.
To enable the creation of an editable graph, do the following in your SAS program:
  • Open the LISTING destination. If LISTING is closed, no editable graph is produced. Other destinations can be open as well.
  • Add the SGE=ON option to the LISTING destination.
    Here is the general form of the SGE option:
    sge = on|off|yes|no
    Here is an example of its usage in an ODS LISTING statement:
    ods listing sge = on;
  • If needed, activate the ODS Graphics environment with the ODS GRAPHICS ON statement. This is not required for SAS/GRAPH procedures that produce only ODS Graphics output (SGPLOT, SGPANEL, SGSCATTER, or SGRENDER).
When you execute the SAS program, SAS creates an ODS Graphics Editor (SGE) file along with the graph image file. You can then open the SGE file from the Results window. For details, see Edit an ODS Graph from the SAS Results Window.
Note: You cannot open an SGE file on z/OS systems. For more information, see About SGE Files Generated on z/OS Systems.
If you later change and rerun the SAS program, SAS creates a new SGE file. The original SGE file remains in the SAS Results window.
Note: This feature is for SAS 9.2 Phase 2 and later. In SAS 9.2 Phase 1, rerunning the same program overwrites the output in the Results window.
To disable the creation of editable graphs, submit the following code in your program:
ods listing sge = off;
Alternatively, you can close and then reopen the LISTING destination.
Note: For backward-compatibility with SAS 9.2 Phase 1 programs, there is an alternative to the SGE=ON option. With the Results window active, enter SGEDIT ON in the SAS command line. You can then execute a SAS program to create a graph that can be edited. The graph doesn't require the SGE option in its LISTING statement, though the LISTING destination must be active. The SGEDIT ON command remains enabled for future SAS sessions. To turn off the editing option, enter SGEDIT OFF in the command line. If you are using the SAS 9.2 Phase 1 editor, then you must use the SGEDIT ON command. The Results window must be active in order to successfully issue the command. Otherwise, SAS doesn't recognize the command.