Set the title and footnote and create the scatter plot matrix. On the MATRIX statement, the GROUP = option groups the data by the SPECIES variable.


proc sgscatter data=sashelp.iris;
  title "Scatterplot Matrix for Iris Data";
  matrix sepallength petallength sepalwidth petalwidth
         / group=species;
run;