| Overview |
The ODS GRAPHICS statement is used to modify the environment in which graphics templates are executed. It is somewhat like the GOPTIONS statement in intent, but it has no effect on legacy SAS/GRAPH output. Similarly, the GOPTIONS statement does not affect GTL-rendered graphs.
You use the ODS GRAPHICS statement to control
The ODS GRAPHICS statement has the following syntax:
ODS GRAPHICS ON
< / RESET
IMAGEFMT= STATIC | GIF | PNG | JPEG | other-types
IMAGENAME= 'path-and-name'
/* default HEIGHT=480px, default WIDTH=640px */
HEIGHT= size WIDTH= size
SCALE= ON | OFF
BORDER= ON | OFF
ANTIALIASING = ON | OFF
/* IMAGEMAP produces tooltips for HTML destination only */
IMAGEMAP = ON | OFF
more-options
>;
procedures or DATA steps
ODS GRAPHICS OFF;
The following ODS GRAPHICS statement uses the RESET option to prevent the output image name from incrementing (scatter1, scatter2, etc.) every time the graph is produced. The HEIGHT= and WIDTH= options are specified to set an aspect ratio for the output image.
ods graphics on / reset
imagename="scatter" imagefmt=png
height=175px width=200px;
proc sgrender data=sashelp.class
template=scatter;
run;
ods graphics off;
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.