ODS GRAPHICS Statement Options

The ODS GRAPHICS statement is the primary statement that controls the run-time environment for producing template-based graphs. In a sense, is it similar to the GOPTIONS statement for GRSEG-based graphs, but completely independent of that statement. The GOPTIONS statement does not affect template-based graphical output and the ODS GRAPHICS does not affect GRSEG-based graphs.
All options for the ODS GRAPHICS statement are global to a SAS session, unless:
  • the graphics environment is disabled with the ODS GRAPHICS OFF; statement.
  • the RESET or RESET= option of the ODS GRAPHICS statement is used to return the default state to all options or a specific option.
The following table shows some of the available options. For a complete and more detailed explanation of all available options, see the documentation of the ODS GRAPHICS statement in SAS Output Delivery System: User's Guide.
Partial Listing of ODS GRAPHICS Statement Options
Task
Option
Specify the threshold for allowing anti-aliasing.
ANTIALIASMAX= positive-integer
The default is 600 markers and/or lines.
Specify whether graph rendering uses anti-aliasing.
ANTIALIAS= ON | OFF
The default is ON.
Specify whether to draw a border around any graph.
BORDER= ON | OFF
The default is ON.
Increase the maximum number of discrete values that are allowed in a graph.
DISCRETEMAX=positive-integer
The default is 1000. If your graph data contains more than 1000 discrete values, your graph is not drawn and the following warning appears in the SAS log:
WARNING: plot-name statement has too many discrete
values. The plot will not be drawn.
In that case, use the DISCRETEMAX= option to increase the maximum number of discrete values that are allowed.
Specify the height of any graph.
HEIGHT= dimension
Supported dimension units include SPX (special pixels), PX (pixels), IN (inches), CM (centimeters), and MM (millimeters). This option overrides the design height specified by the template definition. The default unit is SPX. It is recommended you always provide a unit such as PX, IN, CM, or MM with the dimension value.
Specify the image format used to generate image files.
OUTPUTFMT= STATIC | image-format
Supported formats include PNG, GIF, JPEG, WMF, TIFF, PDF, EMF, PS, PCL, SVG, and others. The keyword STATIC is the default, which means to automatically select the best format, based on the output destination.
Note: The PDF, PS, EMF, and PCL formats support images in the vector graphics format.
Specify whether data tips are generated.
IMAGEMAP= OFF | ON
The default is OFF.
Specify the base image filename.
IMAGENAME= "file-name" (no path information)
The default is to use the invoking procedure name as the base name.
Control whether legend(s) are drawn.
MAXLEGENDAREA=n
Specifies an integer that is interpreted as the maximum percentage that a legend can occupy in the overall graphics area. The default integer is 20.
Reset one or more ODS GRAPHICS options to its default. RESET by itself is the same as RESET=ALL.
RESET | RESET= option
The option can be ALL, HEIGHT, WIDTH, INDEX, and other options.
By default, each time you run a procedure, new images are created and numbered incrementally using a base name, such as SGRender, SGRender1, SGRender2, and so on. RESET will reset to the base name without the increment number. This is handy if you run a PROC several times and are interested only in the images from the last run (the previous ones will be overwritten). This option is positional, so it typically comes first.
Specify whether the content of any graph is scaled proportionally.
SCALE = ON | OFF
The default is ON.
Specify whether the plot markers are to be scaled with the graph size.
SCALEMARKERS=YES | NO | ON | OFF
The default is ON. The scaling factor is based on the height of the graph cells and the height of the graph.
Specify the maximum number of distinct mouse-over areas allowed before data tips are disabled.
TIPMAX=n
The default number is 500.
Specify the width of any graph.
WIDTH= dimension
Supported dimension units include SPX (special pixels), PX (pixels), IN (inches), CM (centimeters), and MM (millimeters). This option overrides the design width specified by the template definition. The default unit is SPX. It is recommended you always provide a unit such as PX, IN, CM, or MM with the dimension value.