SGSCATTER Procedure
Example 3: Creating a Simple Comparative Panel
Features: |
COMPARE statement
GROUP option
|
Sample library member: |
SGSCCMP |
This example shows a
comparative scatter plot with grouped data.
Program
proc sgscatter data=sashelp.iris;
title "Iris Data: Length and Width";
compare x=(sepallength petallength)
y=(sepalwidth petalwidth)
/ group=species;
run;
title;
Program Description
Create the scatter plot.In
the COMPARE statement, the GROUP= option groups the data by the SPECIES
variable.
proc sgscatter data=sashelp.iris;
title "Iris Data: Length and Width";
compare x=(sepallength petallength)
y=(sepalwidth petalwidth)
/ group=species;
run;
title;
Copyright © SAS Institute Inc. All rights reserved.