Previous Page | Next Page

The SGPLOT Procedure

Example 4: Adding a Prediction Ellipse to a Scatter Plot


Procedure features:

SCATTER statement

ELLIPSE statement

KEYLEGEND statement

Sample library member: GSGPLELI

[GSGPLELI - Adding a Prediction Ellipse to a Scatter Plot]

This example shows a scatter plot with a prediction ellipse.

 Note about code
proc sgplot data=sashelp.iris;
  title "Iris Petal Dimensions";
  scatter x=petallength y=petalwidth;
 Note about code
  ellipse x=petallength y=petalwidth;
 Note about code
  keylegend / location=inside position=bottomright;
run;

Previous Page | Next Page | Top of Page