Previous Page | Next Page

The SGPLOT Procedure

ELLIPSE Statement


Adds a confidence or prediction ellipse to another plot.
Featured in: Adding a Prediction Ellipse to a Scatter Plot
Restriction: The ELLIPSE statement must be used with another plot statement that uses numeric axes.


Syntax

ELLIPSE X= numeric-variable Y= numeric-variable </ option(s)>;

option(s) can be one or more options from the following categories:


Required Arguments

X= numeric-variable

specifies a numeric variable for the X axis.

Y= numeric-variable

specifies a numeric variable for the Y axis.


Options

ALPHA= numeric-value

specifies the confidence level for the ellipse. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).

Default: .05
CLIP

specifies that the data for the ellipse is ignored when determining the data ranges for the axes. By default, the data for the ellipse is considered when determining the data ranges for the axes.

Interaction: This option is automatically set if you specify UNIFORM=SCALE or UNIFORM=ALL option in the PROC SGPLOT statement.
FILL | NOFILL

specifies whether the area fill is visible. The FILL option shows the area fill. The NOFILL option hides the area fill.

Default: The default status of the area fill is specified by the DisplayOpts attribute of the GraphEllipse style element in the current style.
FILLATTRS= style-element | (COLOR= color)

specifies the appearance of the area fill for the ellipse. You can specify the color of the fill by using a style element or by using the COLOR= suboption. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.

Note:   This option has no effect if you specify the NOFILL option.  [cautionend]

Default: The default color is specified by the Color attribute of the GraphDataDefault style element in the current style.
FREQ= numeric-variable

specifies that each observation is repeated n times for computational purposes, where n is the value of the numeric variable. If n is not an integer, then it is truncated to an integer. If n is less than 1 or missing, then it is excluded from the analysis.

LEGENDLABEL= "text-string"

specifies a label that identifies the ellipse in the legend. By default, the label describes the confidence value of the ellipse and the type of ellipse. For example, "95% Prediction Ellipse."

LINEATTRS= style-element <(options)> | (options)

specifies the appearance of the outlines for the ellipse. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.

options can be one or more of the following:

COLOR= color

specifies the color of the line. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.

Default: The default color is specified by the ContrastColor attribute of the GraphDataDefault style element in the current style.
PATTERN= line-pattern

specifies the line pattern for the line. You can reference SAS patterns by number or by name. See Line Patterns for a list of line patterns.

Default: The default line pattern is specified by the LineStyle attribute of the GraphDataDefault style element in the current style.
THICKNESS= n <units>

specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. See Units of Measurement for a list of the measurement units that are supported.

Default: The default line thickness is specified by the LineThickness attribute of the GraphDataDefault style element in the current style.
NAME= "text-string"

specifies a name for the plot. You can use the name to refer to this plot in other statements.

OUTLINE | NOOUTLINE

specifies whether the outlines of the ellipse are visible. The OUTLINE option shows the outlines. The NOOUTLINE option hides the outlines.

Default: The default status of the outlines is specified by the DisplayOpts attribute of the GraphEllipse style element in the current style.
TRANSPARENCY= numeric-value

specifies the degree of transparency for the area fill and outline, if displayed. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).

Default: 0.5
TYPE = MEAN | PREDICTED

specifies the type of ellipse. MEAN specifies a confidence ellipse for the population mean. PREDICTED specifies a prediction ellipse for a new observation. Both ellipse types assume a bivariate normal distribution.

Default: PREDICTED
X2AXIS

assigns the X variable to the secondary (top) horizontal axis.

Y2AXIS

assigns the Y variable to the secondary (right) vertical axis.

Previous Page | Next Page | Top of Page