The ODS Graphics procedures
and applications all use the Graph Template Language (GTL) for their
graph definitions. The ODS Graphics software components complement
each other, and can often be used together.
Here are some tasks
that you can perform using different combinations of ODS Graphics
software.
-
Produce a graph as part of your statistical
analysis and specify the style and size of the graph.
Here are the high-level
steps:
-
Enable ODS Graphics
in your statistical procedure.
-
In your program, specify
the ODS destination and options that you want, such as the style.
-
Use the ODS GRAPHICS
statement options to control various aspects of the graph output,
such as the size.
-
Produce a graph that was created in
the Graph Template Language (GTL).
Here are the high-level
steps:
-
Create a graph template
using the GTL.
-
Render the compiled
template using the SGRENDER procedure.
-
Produce
in batch mode a graph that was created in the ODS Graphics Designer.
Here are the high-level
steps:
-
Create the graph using
the ODS Graphics Designer.
-
Render the graph using
the SGDESIGN procedure as part of a batch. In your program, you can
specify the ODS destination and any supported ODS options.
If the SGD file has
been defined with dynamic variables, then you can substitute a different
value for a variable by using the DYNAMIC statement.
-
You can also export
the graph template from the ODS Graphics Designer. You can then save
the code as a SAS program to be run in batch mode.
-
Annotate
a graph that was generated for your analysis.
Here are the high-level
steps:
-
Make sure that ODS Graphics
is enabled for your procedure.
-
In your program, specify
the SGE= ON option in the ODS destination statement.
-
Annotate the graph using
the ODS Graphics Editor.
-
Do either of the following:
-
Save the SGE file in the format
that you want.
-
Render the SGE file using the SGRENDER
procedure. In your program, you can specify the ODS destination and
options that you want. You can also use the ODS GRAPHICS statement
options to control various aspects of the graph output.
-
Produce an annotated
ODS Graphics Designer graph for publication.
Here are the high-level
steps:
-
Create the graph using
the ODS Graphics Designer.
-
Produce an editable
graph using the SGDESIGN procedure. In your program, specify the SGE=
ON option in the ODS destination statement.
-
Annotate the graph using
the ODS Graphics Editor.
-
Do either of the following:
-
Save the file in the PNG format.
-
Save the file in the SGE format,
and then render the SGE file using the SGRENDER procedure. In your
program, you can specify the ODS destination and options that you
want. You can also use the ODS GRAPHICS statement options to control
various aspects of the graph output.
-
Customize the template for a graph that was created in the ODS Graphics
Designer.
Here are the high-level
steps:
-
Create the graph using
the ODS Graphics Designer.
-
Export the graph template
from the designer.
-
Paste the code into
SAS and customize the graph template using the GTL.
-
Render the compiled
template using the SGRENDER procedure.
-
Customize the template for a graph that was created using the ODS
Graphics procedures.
Here are the high-level
steps:
-
Create a graph using
the SGPLOT or the SGSCATTER procedure. In the procedure statement,
specify the TMPLOUT= option. This option writes the template code
for your graph to a file.
-
In SAS, customize the
exported template using the GTL.
-
Render the compiled
template using the SGRENDER procedure.
-
Produce graphs in batch
mode using a custom style that was created in the ODS Graphics Designer.
Here are the high-level
steps:
-
Create a custom style
using the ODS Graphics Designer.
-
-
Execute the exported
code in SAS to compile the style and save it in the style template
store.
-
Apply the style to your
procedures by specifying the style in the ODS destination statement.