For creation of ODS
graphs, a valid ODS destination must be active. In Windows and UNIX
operating environments, when the ODS Graphics procedures are executed
in the SAS Windowing environment, HTML is the default destination.
The default destination for batch mode is LISTING.
CAUTION:
Take care
when closing the HTML destination.
If you close this
destination and do not open another destination, then no destinations
are open.
You can use ODS destination
statement options to specify where you want your output to be displayed
and where you want your image files to be stored.
These options are specified
on ODS destination statements, using the following form:
ODS destination <option(s);>
The ODS HTML statement
below specifies the following:
-
the name of the output file
-
the folder where images are stored
-
For the complete
program, see
Controlling Graphics with the ODS GRAPHICS Statement.
ods html file="BoxPlot-Body.html"
gpath="C:\myfiles\images" style=journal;
... SAS statements ...
The output is written to the
file
BoxPlot-Body.html
.
Images created by the output are stored in the folder
"C:\myfiles\images"
.
The STYLE= option changes the style from HTMLBlue.Styles to Journal.Styles.
For more information about changing the appearance of your graphics,
see
Controlling the Appearance of Your Graphs.
If you do not specify
a filename for your output, then SAS provides a default file that
is determined by the ODS destination. You can check the SAS log to
verify the name of the file in which your output is saved.
When the procedures
are executed in the SAS Windowing environment, if you do not specify
a directory for the file, the file is saved in the directory that
corresponds to your SAS Work library. The default directory for batch
mode is the SAS current directory.
Tip
You can verify
the location of the current SAS Work library by opening the Libraries
folder in the SAS
Explorer window. Right-click
Work
and select
Properties from the pop-up menu.
For a table that lists
ODS destinations and the formatted output that results from each destination,
see Understanding ODS Destinations in SAS Output Delivery System: User's Guide.
Graphs
rendered to the LISTING destination are not automatically displayed
in the output window. To view these graphs, go to the
Results window
and select the desired graph to view.
You can also
specify some appearance options for the graphics output such as image
DPI, width, height, and style.
For more information,
see Using the ODS GRAPHICS Statement.