PLOTS= Option

Each statistical procedure that supports ODS Graphics has a PLOTS= option that is used to select graphs and specify some options. The syntax of the PLOTS= option is as follows:

PLOTS <(global-plot-options)> <= plot-request<(options)>> ;

PLOTS <(global-plot-options)> <=(plot-request<(options)> <... plot-request<(options)>>)> ;

The PLOTS= option has a common overall syntax for all statistical procedures, but the specific global-plot-options, plot-requests, and plot-options vary across procedures. This section discusses only a few of the options available in the PLOTS= option. For more information about the PLOTS= option, see the Syntax section for each procedure that produces ODS Graphics. There are only a limited number of things that you can control with the PLOTS= option. Most graphical details are controlled either by graph templates (see the section Graph Templates in Chapter 22: ODS Graphics Template Modification,) or by styles (see the section Styles).

The PLOTS= option is usually specified in the PROC statement. However, for some procedures, certain analyses and hence certain plots can appear only if an additional statement is specified. These procedures might have a PLOTS= option in that other statement. For example, the PHREG procedure has a PLOTS= option in the BAYES statement, which is used to perform a Bayesian analysis. See the Syntax section of each procedure chapter for more information. The following examples illustrate the syntax of the PLOTS= option:

plots=all
plots=none
plots=residuals
plots=residuals(smooth)
plots=(trace autocorr)
plots(unpack)
plots(unpack)=diagnostics
plots=diagnostics(unpack)
plots(only)=freqplot
plots=(scree(unpack) loadings(plotref) preloadings(flip))
plots(unpack maxparmlabel=0 stepaxis=number)=coefficients
plots(sigonly)=(rawprob adjusted(unpack))

Also see the Getting Started sections Survival Estimate Plot with PROC LIFETEST, Contour and Surface Plots with PROC KDE, Contour Plots with PROC KRIGE2D, LS-Means Diffogram with PROC GLIMMIX, and Principal Component Analysis Plots with PROC PRINCOMP for examples of the PLOTS= option.

The simplest PLOTS= specifications are of the form PLOTS=plot-request or PLOTS=(plot-requests). When there is more than one plot-request, the plot-request list must appear in parentheses. Each plot-request either requests a plot (for example, RESIDUALS) or provides you with a place to specify plot-specific options (for example, DIAGNOSTICS(UNPACK)). Some simple and typical plot-requests are explained next:

  • PLOTS=ALL requests all plots that are relevant to the analysis. This does not mean that all plots that the procedure can produce are produced. Plots that are produced for one set of options might not appear with PLOTS=ALL and a different set of options. In some cases, certain plots are not produced unless certain options or statements outside the PLOTS= option are specified.

  • PLOTS=NONE disables ODS Graphics for just that step. You can use this option instead of specifying ODS GRAPHICS OFF before a procedure step and ODS GRAPHICS ON after the step when you want to suppress graphics for only that step.

  • PLOTS=RESIDUALS requests a plot of residuals in a modeling procedure such as PROC REG.

  • PLOTS=RESIDUALS(SMOOTH) requests the residuals plot along with a smooth fit function.

  • PLOTS=(TRACE AUTOCORR) requests trace and autocorrelation plots in procedures with Bayesian analysis options.

Global-plot-options appear in parentheses after the option name and before the equal sign. These options affect many or all of the plots. The UNPACK option is a commonly used global-plot-option. It specifies that plots that are normally produced with multiple plots per panel (or packed) should be unpacked and appear in multiple panels with one plot in each panel. The specification PLOTS(UNPACK)=(plot-requests) unpacks all paneled plots. The UNPACK option is also used as an option in a plot-request when you want to unpack only certain panels. For example, the option PLOTS=(DIAGNOSTICS(UNPACK) PARTIAL PREDICTIONS) unpacks only the diagnostics panel. In some cases, unpacked plots contain additional information that is not found in the smaller packed versions. The UNPACK option is not available for all plot-requests; it is available only with plots that have multiple panels by default.

Another commonly used global-plot-option is the ONLY option. Many procedures produce default plots, and additional plots can be requested in the PLOTS= option. Specifying PLOTS=(plot-requests) while omitting the default plots does not prevent the default plots from being produced. The ONLY option is used when you want to see only the plots specifically listed in the plot-request list. Procedures that produce no default plots typically do not provide an ONLY option. You can use ODS SELECT and ODS EXCLUDE (see the section Selecting and Excluding Graphs) to select and exclude graphs, but in some situations the ONLY option is more convenient. It is typically more efficient to select plots by using the PLOTS(ONLY)= option, because the procedure does not do extra work to generate a plot that is excluded by the PLOTS(ONLY)= option. In contrast, ODS SELECT and ODS EXCLUDE have their effect after the procedure has done the work to generate the plot.