The SGPLOT Procedure |
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. |
ELLIPSE X= numeric-variable Y= numeric-variable </ option(s)>; |
option(s) can be one or more options from the following categories:
Ellipse options:
ALPHA= numeric-value | |
CLIP | |
FILL | NOFILL | |
FILLATTRS= style-element | ( COLOR=color) | |
FREQ= numeric-variable | |
LINEATTRS= style-element <(options)> | (options) | |
OUTLINE | NOOUTLINE | |
TYPE = MEAN | PREDICTED |
Plot options:
LEGENDLABEL= "text-string" | |
NAME= "text-string" | |
TRANSPARENCY= numeric-value | |
X2AXIS | |
Y2AXIS |
Required Arguments |
specifies a numeric variable for the X axis.
specifies a numeric variable for the Y axis.
Options |
specifies the confidence level for the ellipse. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Default: | .05 |
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. |
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. |
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.
Default: | The default color is specified by the Color attribute of the GraphDataDefault style element in the current style. |
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.
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."
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:
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. |
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. |
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. |
specifies a name for the plot. You can use the name to refer to this plot in other statements.
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. |
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 |
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 |
assigns the X variable to the secondary (top) horizontal axis.
assigns the Y variable to the secondary (right) vertical axis.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.