
Example 5: Adding a Prediction Ellipse to a Scatter Plot
Features: SCATTER statement
ELLIPSE statement
KEYLEGEND statement
Sample library
member:
SGPLELI
This example shows a scatter plot with a prediction ellipse.
Output
Program
proc sgplot data=sashelp.iris;
title "Iris Petal Dimensions";
scatter x=petallength y=petalwidth;
ellipse x=petallength y=petalwidth;
keylegend / location=inside position=bottomright;
run;
title;
Program Description
Set the title and create the scatter plot.
proc sgplot data=sashelp.iris;
title "Iris Petal Dimensions";
scatter x=petallength y=petalwidth;
Example 5: Adding a Prediction Ellipse to a Scatter Plot 831