
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;
Create the ellipse.
ellipse x=petallength y=petalwidth;
Position the Legend. The LOCATION= option places the legend inside the plot area.
The POSITION= option places the legend at the bottom right.
keylegend / location=inside position=bottomright;
run;
Cancel the title.
title;
Example 5: ...