Statistical Graphics


Summary of Graph Options

For each graph type, you must specify a vector of data. The BAR, BOX, and HISTOGRAM subroutines require at least one vector of data; the SCATTER and SERIES subroutines require two vectors of data. The remaining arguments are optional and specify additional data or parameters that set options in the SGPLOT procedure.

Some options are common to all ODS statistical graphics subroutines. The following common options specify options in the XAXIS and YAXIS statements in the SGPLOT procedure:

GRID=

specifies whether grid lines are displayed for the X and Y axes. This option corresponds to the GRID option in the XAXIS and YAXIS statements.

LABEL=

specifies axis labels for the X or Y axis. If the argument is a scalar, the value of the argument is used for the X-axis label. If the argument has two elements, the first is used for the X-axis label and the second for the Y-axis label. If this option is not specified, the labels "X" and "Y" are used for labels.

XVALUES=

specifies a vector of values for ticks for the X axis.

YVALUES=

specifies a vector of values for ticks for the Y axis.

PROCOPT=

specifies a character matrix or string literal. The value is used verbatim to specify options in the PROC SGPLOT statement.

OTHER=

specifies a character matrix or string literal. You can use this option to specify one or more complete statements in the SGPLOT procedure. For example, you can specify multiple REFLINE statements and an INSET statement.

Table 16.1 summarizes options that apply to only certain graph types.

Table 16.1: Options for ODS Statistical Graphical Subroutines

Option

BAR

BOX

HISTOGRAM

SCATTER

SERIES

FREQ=

X

       

CATEGORY=

 

X

     

SCALE=

   

X

   

DENSITY=

   

X

   

REBIN=

   

X

   

LINEPARM=

     

X

 

ORDER=

X

X

     

TYPE=

X

X

     

GROUPOPT=

X

X

     

GROUP=

X

X

 

X

X

DATALABEL=

 

X

 

X

 

OPTION=

 

X

 

X

X


Specify mandatory arguments (the data) in parentheses after the name of the subroutine. Specify options outside the parentheses.

You can add a title and footnotes to a plot by using the global TITLE and FOOTNOTE statements.